Package ome.util
Class PrivilegedStringType
- java.lang.Object
-
- org.hibernate.type.AbstractStandardBasicType<T>
-
- org.hibernate.type.AbstractSingleColumnStandardBasicType<java.lang.String>
-
- ome.util.PrivilegedStringType
-
- All Implemented Interfaces:
java.io.Serializable
,org.hibernate.type.BasicType
,org.hibernate.type.DiscriminatorType<java.lang.String>
,org.hibernate.type.IdentifierType<java.lang.String>
,org.hibernate.type.LiteralType<java.lang.String>
,org.hibernate.type.SingleColumnType<java.lang.String>
,org.hibernate.type.StringRepresentableType<java.lang.String>
,org.hibernate.type.Type
,org.hibernate.type.XmlRepresentableType<java.lang.String>
- Direct Known Subclasses:
PrivilegedStringType.FilteredFullAdmin
,PrivilegedStringType.FilteredFullAdminHidden
,PrivilegedStringType.FilteredFullAdminUUID
,PrivilegedStringType.FilteredRelatedUser
,PrivilegedStringType.FilteredRelatedUserHidden
public abstract class PrivilegedStringType extends org.hibernate.type.AbstractSingleColumnStandardBasicType<java.lang.String> implements org.hibernate.type.DiscriminatorType<java.lang.String>
A Hibernate type for string-valued properties where only privileged readers see non-null
values.- Since:
- 5.5.5
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrivilegedStringType.FilteredFullAdmin
String type for which users readnull
except for full administrators.static class
PrivilegedStringType.FilteredFullAdminHidden
String type for which users read a dummy value except for full administrators.static class
PrivilegedStringType.FilteredFullAdminUUID
String type for which users read a dummy UUID except for full administrators.static class
PrivilegedStringType.FilteredRelatedUser
String type for which users readnull
except for (potentially) related users.static class
PrivilegedStringType.FilteredRelatedUserHidden
String type for which users read a dummy value except for (potentially) related users.
-
Constructor Summary
Constructors Constructor Description PrivilegedStringType(org.hibernate.type.descriptor.sql.VarcharTypeDescriptor sqlInstance, PrivilegedStringTypeDescriptor javaInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
java.lang.String
objectToSQLString(java.lang.String value, org.hibernate.dialect.Dialect dialect)
java.lang.String
stringToObject(java.lang.String xml)
java.lang.String
toString(java.lang.String value)
-
Methods inherited from class org.hibernate.type.AbstractSingleColumnStandardBasicType
get, nullSafeGet, nullSafeSet, nullSafeSet, set, sqlType
-
Methods inherited from class org.hibernate.type.AbstractStandardBasicType
assemble, beforeAssemble, compare, deepCopy, deepCopy, disassemble, fromString, fromStringValue, fromXMLNode, fromXMLString, get, getColumnSpan, getHashCode, getHashCode, getHashCode, getJavaTypeDescriptor, getMutabilityPlan, getRegistrationKeys, getReplacement, getReturnedClass, getSemiResolvedType, getSqlTypeDescriptor, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isEqual, isModified, isMutable, isSame, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, registerUnderJavaType, replace, replace, resolve, semiResolve, set, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString, toXMLString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.type.SingleColumnType
fromStringValue, get, nullSafeGet, set
-
Methods inherited from interface org.hibernate.type.Type
assemble, beforeAssemble, compare, deepCopy, disassemble, fromXMLNode, getColumnSpan, getHashCode, getHashCode, getReturnedClass, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, resolve, semiResolve, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString
-
-
-
-
Constructor Detail
-
PrivilegedStringType
public PrivilegedStringType(org.hibernate.type.descriptor.sql.VarcharTypeDescriptor sqlInstance, PrivilegedStringTypeDescriptor javaInstance)
- Parameters:
sqlInstance
- the SQL type of the privileged stringsjavaInstance
- the Java type of the privileged strings
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceorg.hibernate.type.Type
-
objectToSQLString
public java.lang.String objectToSQLString(java.lang.String value, org.hibernate.dialect.Dialect dialect) throws java.lang.Exception
- Specified by:
objectToSQLString
in interfaceorg.hibernate.type.LiteralType<java.lang.String>
- Throws:
java.lang.Exception
-
stringToObject
public java.lang.String stringToObject(java.lang.String xml) throws java.lang.Exception
- Specified by:
stringToObject
in interfaceorg.hibernate.type.IdentifierType<java.lang.String>
- Throws:
java.lang.Exception
-
toString
public java.lang.String toString(java.lang.String value)
- Specified by:
toString
in interfaceorg.hibernate.type.SingleColumnType<java.lang.String>
- Specified by:
toString
in interfaceorg.hibernate.type.StringRepresentableType<java.lang.String>
- Overrides:
toString
in classorg.hibernate.type.AbstractStandardBasicType<java.lang.String>
-
-