Class PropertyMetadata
- java.lang.Object
-
- net.lecousin.reactive.data.relational.model.metadata.PropertyMetadata
-
public class PropertyMetadata extends Object
Information about an entity property, with specificities on a database connection (such as sql identifier).- Author:
- Guillaume Le Cousin
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LcReactiveDataRelationalClientgetClient()org.springframework.data.relational.core.sql.SqlIdentifiergetColumnName()EntityMetadatagetEntity()ForeignKeygetForeignKeyAnnotation()EntityMetadatagetForeignKeyEntityMetadata()ForeignTablegetForeignTableAnnotation()GeneratedValuegetGeneratedValueAnnotation()GeneratedValue.StrategygetGeneratedValueStrategy()TypegetGenericType()StringgetName()GeneratedValuegetRequiredGeneratedValueAnnotation()org.springframework.data.relational.core.mapping.RelationalPersistentPropertygetRequiredSpringProperty()org.springframework.data.relational.core.mapping.RelationalPersistentPropertygetSpringProperty()PropertyStaticMetadatagetStaticMetadata()Class<?>getType()booleanisCollection()booleanisCreatedDate()booleanisForeignKey()booleanisForeignTable()booleanisGeneratedValue()booleanisId()booleanisLastModifiedDate()booleanisNullable()Check if a property may be null.
It cannot be null if: the type is a primitive type this is the id property this is a foreign key, and it is specified as non optional this is not a foreign key, and the column definition specifies the column as nullablebooleanisPersistent()booleanisUpdatable()booleanisVersion()booleanisWritable()
-
-
-
Method Detail
-
getName
@NonNull public String getName()
-
getType
@NonNull public Class<?> getType()
-
getGenericType
@NonNull public Type getGenericType()
-
getEntity
@NonNull public EntityMetadata getEntity()
-
getStaticMetadata
@NonNull public PropertyStaticMetadata getStaticMetadata()
-
getSpringProperty
@Nullable public org.springframework.data.relational.core.mapping.RelationalPersistentProperty getSpringProperty()
-
getRequiredSpringProperty
@NonNull public org.springframework.data.relational.core.mapping.RelationalPersistentProperty getRequiredSpringProperty()
-
getClient
@NonNull public LcReactiveDataRelationalClient getClient()
-
isPersistent
public boolean isPersistent()
-
isWritable
public boolean isWritable()
-
isForeignKey
public boolean isForeignKey()
-
getForeignKeyAnnotation
public ForeignKey getForeignKeyAnnotation()
-
getForeignKeyEntityMetadata
public EntityMetadata getForeignKeyEntityMetadata()
-
isForeignTable
public boolean isForeignTable()
-
getForeignTableAnnotation
public ForeignTable getForeignTableAnnotation()
-
isCollection
public boolean isCollection()
-
isGeneratedValue
public boolean isGeneratedValue()
-
getGeneratedValueStrategy
@NonNull public GeneratedValue.Strategy getGeneratedValueStrategy()
-
getGeneratedValueAnnotation
@Nullable public GeneratedValue getGeneratedValueAnnotation()
-
getRequiredGeneratedValueAnnotation
@NonNull public GeneratedValue getRequiredGeneratedValueAnnotation()
-
isId
public boolean isId()
-
isVersion
public boolean isVersion()
-
isCreatedDate
public boolean isCreatedDate()
-
isLastModifiedDate
public boolean isLastModifiedDate()
-
getColumnName
public org.springframework.data.relational.core.sql.SqlIdentifier getColumnName()
-
isUpdatable
public boolean isUpdatable()
-
isNullable
public boolean isNullable()
Check if a property may be null.
It cannot be null if:- the type is a primitive type
- this is the id property
- this is a foreign key, and it is specified as non optional
- this is not a foreign key, and the column definition specifies the column as nullable
- Parameters:
property-- Returns:
-
-