Package org.keycloak.models.map.storage
Class ModelEntityUtil
java.lang.Object
org.keycloak.models.map.storage.ModelEntityUtil
Utility class covering various aspects of relationship between model and entity classes.
- Author:
- hmlnarik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
entityFieldsKnown
(Class<?> entityClass) static <V extends AbstractEntity>
Optional<EntityField<V>>getEntityField
(Class<V> entityClass, String fieldNameCamelCase) static <V> Stream<EntityField<V>>
getEntityFields
(Class<V> entityClass) static <V extends AbstractEntity,
M>
Class<V>getEntityType
(Class<M> modelClass) static <V extends AbstractEntity,
M>
Class<V>getEntityType
(Class<M> modelClass, Class<? extends AbstractEntity> defaultClass) static <V extends AbstractEntity>
EntityField<V>getIdField
(Class<V> targetEntityClass) static <M> Class<M>
getModelClass
(String key) static String
getModelName
(Class<?> key) static String
getModelName
(Class<?> key, String defaultValue) static <V extends AbstractEntity,
M>
Class<M>getModelType
(Class<V> entityClass) static <V extends AbstractEntity,
M>
Class<M>getModelType
(Class<V> entityClass, Class<M> defaultClass) static <V extends AbstractEntity>
EntityField<V>getRealmIdField
(Class<V> targetEntityClass) static <T extends AbstractEntity & UpdatableEntity>
TsupplyReadOnlyFieldValueIfUnset
(T entity, EntityField<T> entityField, Object value)
-
Constructor Details
-
ModelEntityUtil
public ModelEntityUtil()
-
-
Method Details
-
getEntityType
-
getEntityType
public static <V extends AbstractEntity,M> Class<V> getEntityType(Class<M> modelClass, Class<? extends AbstractEntity> defaultClass) -
getModelType
-
getModelType
public static <V extends AbstractEntity,M> Class<M> getModelType(Class<V> entityClass, Class<M> defaultClass) -
getModelName
-
getModelName
-
getModelNames
-
getModelClass
-
entityFieldsKnown
-
getEntityFields
-
getEntityField
public static <V extends AbstractEntity> Optional<EntityField<V>> getEntityField(Class<V> entityClass, String fieldNameCamelCase) -
getIdField
-
getRealmIdField
-
supplyReadOnlyFieldValueIfUnset
public static <T extends AbstractEntity & UpdatableEntity> T supplyReadOnlyFieldValueIfUnset(T entity, EntityField<T> entityField, Object value)
-