ENTITY - the entity typeBASIC - the property basic typeCONTAINER - the property container typepublic class DefaultPropertyType<ENTITY,BASIC,CONTAINER> extends java.lang.Object implements EntityPropertyType<ENTITY,BASIC>
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultPropertyType.DefaultProperty |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
columnName |
protected java.lang.Class<ENTITY> |
entityClass |
protected org.seasar.doma.internal.jdbc.entity.PropertyField<ENTITY> |
field |
protected boolean |
insertable |
protected java.lang.String |
name |
protected NamingType |
namingType |
protected boolean |
quoteRequired |
protected java.util.function.Supplier<org.seasar.doma.internal.jdbc.scalar.Scalar<BASIC,CONTAINER>> |
scalarSupplier |
protected java.lang.String |
simpleName |
protected boolean |
updatable |
| Constructor and Description |
|---|
DefaultPropertyType(java.lang.Class<ENTITY> entityClass,
java.util.function.Supplier<org.seasar.doma.internal.jdbc.scalar.Scalar<BASIC,CONTAINER>> scalarSupplier,
java.lang.String name,
java.lang.String columnName,
NamingType namingType,
boolean insertable,
boolean updatable,
boolean quoteRequired) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(ENTITY destEntity,
ENTITY srcEntity)
Copies this property value.
|
Property<ENTITY,BASIC> |
createProperty()
Creates the property.
|
java.lang.String |
getColumnName()
Return the column name.
|
java.lang.String |
getColumnName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction)
Return the column name.
|
java.lang.String |
getColumnName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction,
java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
Return the column name.
|
java.lang.String |
getColumnName(java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
Return the column name.
|
java.lang.String |
getName()
Returns the property name.
|
boolean |
isId()
Whether this property is an identifier.
|
boolean |
isInsertable()
Whether the column that is mapped to this property is included in SQL INSERT statements.
|
boolean |
isQuoteRequired()
Whether quotation marks are required to the column name.
|
boolean |
isTenantId()
Whether this property is a tenant id.
|
boolean |
isUpdatable()
Whether the column that is mapped to this property is included in SQL UPDATE statements.
|
boolean |
isVersion()
Whether this property is a version.
|
protected <VALUE> ENTITY |
modifyIfNecessary(EntityType<ENTITY> entityType,
ENTITY entity,
WrapperVisitor<java.lang.Boolean,VALUE,java.lang.Void,java.lang.RuntimeException> visitor,
VALUE value) |
protected final java.lang.Class<ENTITY> entityClass
protected final java.util.function.Supplier<org.seasar.doma.internal.jdbc.scalar.Scalar<BASIC,CONTAINER>> scalarSupplier
protected final java.lang.String name
protected final java.lang.String simpleName
protected final java.lang.String columnName
protected final NamingType namingType
protected final boolean insertable
protected final boolean updatable
protected final boolean quoteRequired
protected final org.seasar.doma.internal.jdbc.entity.PropertyField<ENTITY> field
public DefaultPropertyType(java.lang.Class<ENTITY> entityClass, java.util.function.Supplier<org.seasar.doma.internal.jdbc.scalar.Scalar<BASIC,CONTAINER>> scalarSupplier, java.lang.String name, java.lang.String columnName, NamingType namingType, boolean insertable, boolean updatable, boolean quoteRequired)
public Property<ENTITY,BASIC> createProperty()
EntityPropertyTypecreateProperty in interface EntityPropertyType<ENTITY,BASIC>public void copy(ENTITY destEntity, ENTITY srcEntity)
EntityPropertyTypeThis method does deep copy. But this method does not copy JDBC specific objects such as
Blob.
copy in interface EntityPropertyType<ENTITY,BASIC>destEntity - the entity that is the copy destinationsrcEntity - the entity that is the copy sourcepublic java.lang.String getName()
EntityPropertyTypegetName in interface EntityPropertyType<ENTITY,BASIC>public java.lang.String getColumnName()
EntityPropertyTypegetColumnName in interface EntityPropertyType<ENTITY,BASIC>public java.lang.String getColumnName(java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
EntityPropertyTypegetColumnName in interface EntityPropertyType<ENTITY,BASIC>quoteFunction - the function that applies quotation markspublic java.lang.String getColumnName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction)
EntityPropertyTypegetColumnName in interface EntityPropertyType<ENTITY,BASIC>namingFunction - the function that applies naming conventionpublic java.lang.String getColumnName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction, java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
EntityPropertyTypegetColumnName in interface EntityPropertyType<ENTITY,BASIC>namingFunction - the function that applies naming conventionquoteFunction - the function that applies quotation markspublic boolean isQuoteRequired()
EntityPropertyTypeisQuoteRequired in interface EntityPropertyType<ENTITY,BASIC>true if requiredpublic boolean isId()
EntityPropertyTypeisId in interface EntityPropertyType<ENTITY,BASIC>true if this property is an identifierpublic boolean isVersion()
EntityPropertyTypeisVersion in interface EntityPropertyType<ENTITY,BASIC>true if this property is a versionpublic boolean isTenantId()
EntityPropertyTypeisTenantId in interface EntityPropertyType<ENTITY,BASIC>true if this property is a tenant idpublic boolean isInsertable()
EntityPropertyTypeisInsertable in interface EntityPropertyType<ENTITY,BASIC>true if included in SQL INSERT statements.public boolean isUpdatable()
EntityPropertyTypeisUpdatable in interface EntityPropertyType<ENTITY,BASIC>true if included in SQL UPDATE statements.protected <VALUE> ENTITY modifyIfNecessary(EntityType<ENTITY> entityType, ENTITY entity, WrapperVisitor<java.lang.Boolean,VALUE,java.lang.Void,java.lang.RuntimeException> visitor, VALUE value)