Class JpaSingleUseObjectEntity
- java.lang.Object
-
- org.keycloak.models.map.common.UpdatableEntity.Impl
-
- org.keycloak.models.map.singleUseObject.MapSingleUseObjectEntity.AbstractSingleUseObjectEntity
-
- org.keycloak.models.map.storage.jpa.singleUseObject.entity.JpaSingleUseObjectEntity
-
- All Implemented Interfaces:
Serializable
,AbstractEntity
,ExpirableEntity
,UpdatableEntity
,MapSingleUseObjectEntity
,JpaRootEntity
,JpaRootVersionedEntity
@Entity public class JpaSingleUseObjectEntity extends MapSingleUseObjectEntity.AbstractSingleUseObjectEntity implements JpaRootVersionedEntity
JPAMapSingleUseObjectEntity
implementation. Some fields are annotated with@Column(insertable = false, updatable = false)
to indicate that they are automatically generated from json fields. As such, these fields are non-insertable and non-updatable.- Author:
- Stefan Guilhen
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.map.singleUseObject.MapSingleUseObjectEntity
MapSingleUseObjectEntity.AbstractSingleUseObjectEntity
-
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 JpaSingleUseObjectEntity()
No-argument constructor, used by hibernate to instantiate entities.JpaSingleUseObjectEntity(DeepCloner cloner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Integer
getCurrentSchemaVersion()
Integer
getEntityVersion()
Long
getExpiration()
Returns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.String
getId()
String
getNote(String name)
Map<String,String>
getNotes()
String
getObjectKey()
int
getVersion()
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
isMetadataInitialized()
void
setEntityVersion(Integer entityVersion)
void
setExpiration(Long expiration)
Sets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.void
setId(String id)
void
setNote(String name, String value)
void
setNotes(Map<String,String> notes)
void
setObjectKey(String objectKey)
-
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
-
JpaSingleUseObjectEntity
public JpaSingleUseObjectEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaSingleUseObjectEntity
public JpaSingleUseObjectEntity(DeepCloner cloner)
-
-
Method Detail
-
isMetadataInitialized
public boolean isMetadataInitialized()
-
getVersion
public int getVersion()
Description copied from interface:JpaRootVersionedEntity
Version of the JPA entity used for optimistic locking- Specified by:
getVersion
in interfaceJpaRootVersionedEntity
-
getEntityVersion
public Integer getEntityVersion()
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
getId
public String getId()
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapSingleUseObjectEntity.AbstractSingleUseObjectEntity
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapSingleUseObjectEntity.AbstractSingleUseObjectEntity
-
getObjectKey
public String getObjectKey()
- Specified by:
getObjectKey
in interfaceMapSingleUseObjectEntity
-
setObjectKey
public void setObjectKey(String objectKey)
- Specified by:
setObjectKey
in interfaceMapSingleUseObjectEntity
-
getCurrentSchemaVersion
public Integer getCurrentSchemaVersion()
- Specified by:
getCurrentSchemaVersion
in interfaceJpaRootEntity
-
getNotes
public Map<String,String> getNotes()
- Specified by:
getNotes
in interfaceMapSingleUseObjectEntity
-
getNote
public String getNote(String name)
- Specified by:
getNote
in interfaceMapSingleUseObjectEntity
-
setNotes
public void setNotes(Map<String,String> notes)
- Specified by:
setNotes
in interfaceMapSingleUseObjectEntity
-
setNote
public void setNote(String name, String value)
- Specified by:
setNote
in interfaceMapSingleUseObjectEntity
-
getExpiration
public Long getExpiration()
Description copied from interface:ExpirableEntity
Returns a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
getExpiration
in interfaceExpirableEntity
- Returns:
- a timestamp in milliseconds since The Epoch or
null
if this entity never expires or expiration is not known.
-
setExpiration
public void setExpiration(Long expiration)
Description copied from interface:ExpirableEntity
Sets a point in the time (timestamp in milliseconds since The Epoch) when this entity expires.- Specified by:
setExpiration
in interfaceExpirableEntity
- Parameters:
expiration
- a timestamp in milliseconds since The Epoch ornull
if this entity never expires.
-
-