|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.persistence.support.impl.UserPermissionType
public class UserPermissionType
This class defines a Hibernate customer value type UserPermission
.
This is the type of the component objects of a collection property in UserRole
.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Constructor Summary | |
---|---|
UserPermissionType()
|
Method Summary | |
---|---|
java.lang.Object |
assemble(java.io.Serializable cached,
java.lang.Object owner)
Assemble an instance from the given Serializable object. |
java.lang.Object |
deepCopy(java.lang.Object value)
Deep copy the given object. |
java.io.Serializable |
disassemble(java.lang.Object value)
Returns a Serializable object of the given instance. |
boolean |
equals(java.lang.Object objectX,
java.lang.Object objectY)
Returns true if the given 2 instances equals to each other. |
int |
hashCode(java.lang.Object object)
Returns the hash code of the given instance. |
boolean |
isMutable()
Returns true if the instance of the value type is mutable. |
java.lang.Object |
nullSafeGet(java.sql.ResultSet resultSet,
java.lang.String[] names,
java.lang.Object owner)
Generates and returns an instance from the given JDBC ResultSet . |
void |
nullSafeSet(java.sql.PreparedStatement statement,
java.lang.Object value,
int index)
Writes the property value to the JDBC PreparedStatement . |
java.lang.Object |
replace(java.lang.Object original,
java.lang.Object target,
java.lang.Object owner)
During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. |
java.lang.Class |
returnedClass()
Returns a java type(class) that is been mapped. |
int[] |
sqlTypes()
Returns an array of sql column type codes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public UserPermissionType()
Method Detail |
---|
public java.lang.Object assemble(java.io.Serializable cached, java.lang.Object owner) throws org.hibernate.HibernateException
Serializable
object.
assemble
in interface org.hibernate.usertype.UserType
cached
- the Serializable
objectowner
- not used
org.hibernate.HibernateException
- - if something goes wrong.public java.lang.Object deepCopy(java.lang.Object value)
deepCopy
in interface org.hibernate.usertype.UserType
value
- the given object.
public java.io.Serializable disassemble(java.lang.Object value)
Serializable
object of the given instance.
disassemble
in interface org.hibernate.usertype.UserType
value
- the instance to serialize
Serializable
objectpublic boolean equals(java.lang.Object objectX, java.lang.Object objectY)
equals
in interface org.hibernate.usertype.UserType
objectX
- the first given objectobjectY
- the second given object
true
if the given 2 instances equals to each otherpublic int hashCode(java.lang.Object object)
hashCode
in interface org.hibernate.usertype.UserType
object
- the object.
public boolean isMutable()
true
if the instance of the value type is mutable.
Otherwise, returns false
.
isMutable
in interface org.hibernate.usertype.UserType
true
if the instance of the value type is mutable.
Otherwise, returns false
.public java.lang.Object nullSafeGet(java.sql.ResultSet resultSet, java.lang.String[] names, java.lang.Object owner) throws java.sql.SQLException
ResultSet
.
nullSafeGet
in interface org.hibernate.usertype.UserType
resultSet
- the JDBC ResultSet
names
- the column namesowner
- not used
java.sql.SQLException
- in case of any erros to access the result set.public void nullSafeSet(java.sql.PreparedStatement statement, java.lang.Object value, int index) throws java.sql.SQLException
PreparedStatement
.
nullSafeSet
in interface org.hibernate.usertype.UserType
statement
- the JDBC PreparedStatement
value
- the instance to writeindex
- the index number of the column
java.sql.SQLException
- in case of any sql errorpublic java.lang.Object replace(java.lang.Object original, java.lang.Object target, java.lang.Object owner)
replace
in interface org.hibernate.usertype.UserType
original
- the value from the detached entity being mergedtarget
- the value in the managed entityowner
- not used
public java.lang.Class returnedClass()
returnedClass
in interface org.hibernate.usertype.UserType
public int[] sqlTypes()
sqlTypes
in interface org.hibernate.usertype.UserType
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |