public class TypeBuilder<T> extends Object
Constructor and Description |
---|
TypeBuilder(Class<T> type,
String name) |
public TypeBuilder<T> setBaseType(Class<? super T> type)
public TypeBuilder<T> setCacheable(boolean cacheable)
public TypeBuilder<T> setImmutable(boolean immutable)
public TypeBuilder<T> setReadOnly(boolean readOnly)
public TypeBuilder<T> setStateless(boolean stateless)
public TypeBuilder<T> setFactory(Supplier<T> factory)
public TypeBuilder<T> setProxyProvider(Function<T,EntityProxy<T>> provider)
public <B> TypeBuilder<T> setBuilderFactory(Supplier<B> factory)
public <B> TypeBuilder<T> setBuilderFunction(Function<B,T> function)
public TypeBuilder<T> setTableCreateAttributes(String[] attributes)
public TypeBuilder<T> setTableUniqueIndexes(String[] indexes)
public TypeBuilder<T> addAttribute(Attribute<T,?> attribute)
public TypeBuilder<T> addExpression(QueryExpression<?> expression)
public String getName()
getName
in interface Type<T>
getName
in interface Expression<T>
public Class<T> getClassType()
getClassType
in interface Type<T>
getClassType
in interface Expression<T>
Class
for which this type information is for.public Class<? super T> getBaseType()
getBaseType
in interface Type<T>
public ExpressionType getExpressionType()
getExpressionType
in interface Expression<T>
public boolean isCacheable()
isCacheable
in interface Type<T>
public boolean isImmutable()
isImmutable
in interface Type<T>
public boolean isReadOnly()
isReadOnly
in interface Type<T>
public boolean isStateless()
isStateless
in interface Type<T>
public boolean isBuildable()
isBuildable
in interface Type<T>
public Set<Attribute<T,?>> getAttributes()
getAttributes
in interface Type<T>
Attribute
s that this type represents. (includes
all attributes)public Set<Attribute<T,?>> getKeyAttributes()
getKeyAttributes
in interface Type<T>
Attribute
s that are the key for this type.public Attribute<T,?> getSingleKeyAttribute()
getSingleKeyAttribute
in interface Type<T>
public <B> Supplier<B> getBuilderFactory()
getBuilderFactory
in interface Type<T>
B
- builder typeType.isBuildable()
returns the factory that instantiates the builder instance,
otherwise null.public <B> Function<B,T> getBuildFunction()
getBuildFunction
in interface Type<T>
B
- builder typeType.isBuildable()
returns the function that builds the final type from
a builder instance.public Supplier<T> getFactory()
getFactory
in interface Type<T>
Supplier
instance used to provide new instances of Type.getClassType()
.public Function<T,EntityProxy<T>> getProxyProvider()
getProxyProvider
in interface Type<T>
Function
provider for retrieving the EntityProxy
for a
given entity instance.public String[] getTableCreateAttributes()
getTableCreateAttributes
in interface Type<T>
Table.createAttributes()
public String[] getTableUniqueIndexes()
getTableUniqueIndexes
in interface Type<T>
Table.uniqueIndexes()
()}