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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.map.authorization.entity.MapResourceEntity
MapResourceEntity.AbstractMapResourceEntity
-
Nested 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
Constructors Constructor Description JpaResourceEntity()No-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
-
Methods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
clearUpdatedFlag, isUpdated
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntity
updateEntityVersion
-
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntity
clearUpdatedFlag, isUpdated
-
-
-
-
Constructor Detail
-
JpaResourceEntity
public JpaResourceEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaResourceEntity
public JpaResourceEntity(DeepCloner cloner)
-
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 Detail
-
isMetadataInitialized
public boolean isMetadataInitialized()
-
getEntityVersion
public Integer getEntityVersion()
- Specified by:
getEntityVersionin interfaceJpaRootEntity- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- Specified by:
setEntityVersionin interfaceJpaRootEntity- Parameters:
entityVersion- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
public Integer 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
public String getId()
- Specified by:
getIdin interfaceAbstractEntity- Overrides:
getIdin classMapResourceEntity.AbstractMapResourceEntity
-
setId
public void setId(String id)
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapResourceEntity.AbstractMapResourceEntity
-
getRealmId
public String getRealmId()
- Specified by:
getRealmIdin interfaceMapResourceEntity
-
setRealmId
public void setRealmId(String realmId)
- Specified by:
setRealmIdin interfaceMapResourceEntity
-
getName
public String getName()
- Specified by:
getNamein interfaceMapResourceEntity
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceMapResourceEntity
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceMapResourceEntity
-
setDisplayName
public void setDisplayName(String displayName)
- Specified by:
setDisplayNamein interfaceMapResourceEntity
-
getUris
public Set<String> getUris()
- Specified by:
getUrisin interfaceMapResourceEntity
-
setUris
public void setUris(Set<String> uris)
- Specified by:
setUrisin interfaceMapResourceEntity
-
getType
public String getType()
- Specified by:
getTypein interfaceMapResourceEntity
-
setType
public void setType(String type)
- Specified by:
setTypein interfaceMapResourceEntity
-
getIconUri
public String getIconUri()
- Specified by:
getIconUriin interfaceMapResourceEntity
-
setIconUri
public void setIconUri(String iconUri)
- Specified by:
setIconUriin interfaceMapResourceEntity
-
getOwner
public String getOwner()
- Specified by:
getOwnerin interfaceMapResourceEntity
-
setOwner
public void setOwner(String owner)
- Specified by:
setOwnerin interfaceMapResourceEntity
-
isOwnerManagedAccess
public Boolean isOwnerManagedAccess()
- Specified by:
isOwnerManagedAccessin interfaceMapResourceEntity
-
setOwnerManagedAccess
public void setOwnerManagedAccess(Boolean ownerManagedAccess)
- Specified by:
setOwnerManagedAccessin interfaceMapResourceEntity
-
setResourceServerId
public void setResourceServerId(String resourceServerId)
- Specified by:
setResourceServerIdin interfaceMapResourceEntity
-
getResourceServerId
public String getResourceServerId()
- Specified by:
getResourceServerIdin interfaceMapResourceEntity
-
getScopeIds
public Set<String> getScopeIds()
- Specified by:
getScopeIdsin interfaceMapResourceEntity
-
setScopeIds
public void setScopeIds(Set<String> scopeIds)
- Specified by:
setScopeIdsin interfaceMapResourceEntity
-
getAttributes
public Map<String,List<String>> getAttributes()
- Specified by:
getAttributesin interfaceEntityWithAttributes
-
setAttributes
public void setAttributes(Map<String,List<String>> attributes)
- Specified by:
setAttributesin interfaceEntityWithAttributes
-
getAttribute
public List<String> getAttribute(String name)
- Specified by:
getAttributein interfaceEntityWithAttributes
-
setAttribute
public void setAttribute(String name, List<String> values)
- Specified by:
setAttributein interfaceEntityWithAttributes
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfaceEntityWithAttributes
-
-