Package ome.util
Class PrivilegedStringTypeDescriptor
- java.lang.Object
-
- org.hibernate.type.descriptor.java.AbstractTypeDescriptor<java.lang.String>
-
- org.hibernate.type.descriptor.java.StringTypeDescriptor
-
- ome.util.PrivilegedStringTypeDescriptor
-
- All Implemented Interfaces:
java.io.Serializable
,org.hibernate.type.descriptor.java.JavaTypeDescriptor<java.lang.String>
- Direct Known Subclasses:
PrivilegedStringTypeDescriptor.FilteredFullAdmin
,PrivilegedStringTypeDescriptor.FilteredRelatedUser
public abstract class PrivilegedStringTypeDescriptor extends org.hibernate.type.descriptor.java.StringTypeDescriptor
The type descriptors for the privileged string types ofPrivilegedStringType
.- Since:
- 5.5.5
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description PrivilegedStringTypeDescriptor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.function.Function<java.lang.Long,java.lang.Boolean>
getFilter()
protected java.lang.String
getFilterFailure()
static void
setFilter(PrivilegedStringTypeDescriptor.Filter filterType, java.util.function.Function<java.lang.Long,java.lang.Boolean> filter)
Set the filter implementation for a value ofPrivilegedStringTypeDescriptor.Filter
.<X> java.lang.String
wrap(X stringLike, org.hibernate.type.descriptor.WrapperOptions options)
-
Methods inherited from class org.hibernate.type.descriptor.java.StringTypeDescriptor
fromString, toString, unwrap
-
-
-
-
Method Detail
-
setFilter
public static void setFilter(PrivilegedStringTypeDescriptor.Filter filterType, java.util.function.Function<java.lang.Long,java.lang.Boolean> filter)
Set the filter implementation for a value ofPrivilegedStringTypeDescriptor.Filter
. Note that only those forPrivilegedStringTypeDescriptor.Filter.FULL_ADMIN
andPrivilegedStringTypeDescriptor.Filter.RELATED_USER
are consulted.- Parameters:
filterType
- a type of privileged string filterfilter
- the implementation for that filter
-
getFilter
protected abstract java.util.function.Function<java.lang.Long,java.lang.Boolean> getFilter()
- Returns:
- the filter for this descriptor
-
getFilterFailure
protected java.lang.String getFilterFailure()
- Returns:
- the value that this descriptor returns when the filter blocks the underlying value
-
wrap
public <X> java.lang.String wrap(X stringLike, org.hibernate.type.descriptor.WrapperOptions options)
- Specified by:
wrap
in interfaceorg.hibernate.type.descriptor.java.JavaTypeDescriptor<java.lang.String>
- Overrides:
wrap
in classorg.hibernate.type.descriptor.java.StringTypeDescriptor
-
-