Class JpaResourceEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.authorization.entity.MapResourceEntity.AbstractMapResourceEntity
org.keycloak.models.map.storage.jpa.authorization.resource.entity.JpaResourceEntity
- All Implemented Interfaces:
Serializable,MapResourceEntity,AbstractEntity,EntityWithAttributes,UpdatableEntity,JpaRootEntity,JpaRootVersionedEntity
@Entity
public class JpaResourceEntity
extends MapResourceEntity.AbstractMapResourceEntity
implements JpaRootVersionedEntity
There are some fields marked by
@Column(insertable = false, updatable = false).
Those fields are automatically generated by database from json field,
therefore marked as non-insertable and non-updatable to instruct hibernate.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.map.authorization.entity.MapResourceEntity
MapResourceEntity.AbstractMapResourceEntityNested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntity
UpdatableEntity.Impl -
Field Summary
Fields inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
updated -
Constructor Summary
ConstructorsConstructorDescriptionNo-argument constructor, used by hibernate to instantiate entities.JpaResourceEntity(UUID id, int version, Integer entityVersion, String realmId, UUID resourceServerId, String name, String type, String owner) Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaResourceEntity(DeepCloner cloner) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttribute(String name) getId()getName()getOwner()getType()getUris()intVersion of the JPA entity used for optimistic lockinginthashCode()booleanvoidremoveAttribute(String name) voidsetAttribute(String name, List<String> values) voidsetAttributes(Map<String, List<String>> attributes) voidsetDisplayName(String displayName) voidsetEntityVersion(Integer entityVersion) voidsetIconUri(String iconUri) voidvoidvoidvoidsetOwnerManagedAccess(Boolean ownerManagedAccess) voidsetRealmId(String realmId) voidsetResourceServerId(String resourceServerId) voidsetScopeIds(Set<String> scopeIds) voidvoidMethods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
clearUpdatedFlag, isUpdated, markUpdatedFlagMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntity
updateEntityVersionMethods inherited from interface org.keycloak.models.map.common.UpdatableEntity
clearUpdatedFlag, isUpdated, markUpdatedFlag
-
Constructor Details
-
JpaResourceEntity
public JpaResourceEntity()No-argument constructor, used by hibernate to instantiate entities. -
JpaResourceEntity
-
JpaResourceEntity
public JpaResourceEntity(UUID id, int version, Integer entityVersion, String realmId, UUID resourceServerId, String name, String type, String owner) Used by hibernate when calling cb.construct from read(QueryParameters) method. It is used to select object without metadata(json) field.
-
-
Method Details
-
isMetadataInitialized
public boolean isMetadataInitialized() -
getEntityVersion
- Specified by:
getEntityVersionin interfaceJpaRootEntity- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
- Specified by:
setEntityVersionin interfaceJpaRootEntity- Parameters:
entityVersion- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
- Specified by:
getCurrentSchemaVersionin interfaceJpaRootEntity
-
getVersion
public int getVersion()Description copied from interface:JpaRootVersionedEntityVersion of the JPA entity used for optimistic locking- Specified by:
getVersionin interfaceJpaRootVersionedEntity
-
getId
- Specified by:
getIdin interfaceAbstractEntity- Overrides:
getIdin classMapResourceEntity.AbstractMapResourceEntity
-
setId
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapResourceEntity.AbstractMapResourceEntity
-
getRealmId
- Specified by:
getRealmIdin interfaceMapResourceEntity
-
setRealmId
- Specified by:
setRealmIdin interfaceMapResourceEntity
-
getName
- Specified by:
getNamein interfaceMapResourceEntity
-
setName
- Specified by:
setNamein interfaceMapResourceEntity
-
getDisplayName
- Specified by:
getDisplayNamein interfaceMapResourceEntity
-
setDisplayName
- Specified by:
setDisplayNamein interfaceMapResourceEntity
-
getUris
- Specified by:
getUrisin interfaceMapResourceEntity
-
setUris
- Specified by:
setUrisin interfaceMapResourceEntity
-
getType
- Specified by:
getTypein interfaceMapResourceEntity
-
setType
- Specified by:
setTypein interfaceMapResourceEntity
-
getIconUri
- Specified by:
getIconUriin interfaceMapResourceEntity
-
setIconUri
- Specified by:
setIconUriin interfaceMapResourceEntity
-
getOwner
- Specified by:
getOwnerin interfaceMapResourceEntity
-
setOwner
- Specified by:
setOwnerin interfaceMapResourceEntity
-
isOwnerManagedAccess
- Specified by:
isOwnerManagedAccessin interfaceMapResourceEntity
-
setOwnerManagedAccess
- Specified by:
setOwnerManagedAccessin interfaceMapResourceEntity
-
setResourceServerId
- Specified by:
setResourceServerIdin interfaceMapResourceEntity
-
getResourceServerId
- Specified by:
getResourceServerIdin interfaceMapResourceEntity
-
getScopeIds
- Specified by:
getScopeIdsin interfaceMapResourceEntity
-
setScopeIds
- Specified by:
setScopeIdsin interfaceMapResourceEntity
-
getAttributes
- Specified by:
getAttributesin interfaceEntityWithAttributes
-
setAttributes
- Specified by:
setAttributesin interfaceEntityWithAttributes
-
getAttribute
- Specified by:
getAttributein interfaceEntityWithAttributes
-
setAttribute
- Specified by:
setAttributein interfaceEntityWithAttributes
-
removeAttribute
- Specified by:
removeAttributein interfaceEntityWithAttributes
-
hashCode
public int hashCode() -
equals
-