Class EntityStaticMetadata
- java.lang.Object
-
- net.lecousin.reactive.data.relational.model.metadata.EntityStaticMetadata
-
public class EntityStaticMetadata extends Object
Static information (common for all database connections) about an entity class.- Author:
- Guillaume Le Cousin
-
-
Method Summary
-
-
-
Method Detail
-
setClasses
public static void setClasses(Collection<Class<?>> classes) throws ModelException
- Throws:
ModelException
-
get
public static EntityStaticMetadata get(Class<?> clazz)
-
getClasses
public static Collection<Class<?>> getClasses()
-
addGeneratedJoinTables
public static Collection<Class<?>> addGeneratedJoinTables(Collection<Class<?>> classes)
-
getStateField
@NonNull public Field getStateField()
-
getProperties
@NonNull public Collection<PropertyStaticMetadata> getProperties()
-
getProperty
@Nullable public PropertyStaticMetadata getProperty(String name)
-
getRequiredProperty
@NonNull public PropertyStaticMetadata getRequiredProperty(String name)
-
hasCompositeId
public boolean hasCompositeId()
-
getCompositeId
@Nullable public CompositeId getCompositeId()
-
getRequiredCompositeId
@NonNull public CompositeId getRequiredCompositeId()
-
hasForeignTable
public boolean hasForeignTable()
-
hasJoinTable
public boolean hasJoinTable()
-
getForeignKeys
public List<PropertyStaticMetadata> getForeignKeys()
-
getForeignTables
public List<PropertyStaticMetadata> getForeignTables()
-
getForeignTableForJoinKey
@Nullable public PropertyStaticMetadata getForeignTableForJoinKey(String joinKey, Class<?> targetType)
Return the foreign table property having the given join key on the given target type.- Parameters:
joinKey- join keytargetType- type of target entity- Returns:
- the property
-
getJoinTableElementsForJoinTableClass
public <T> Collection<T> getJoinTableElementsForJoinTableClass(Object instance, Class<T> joinTableClass)
-
-