net.java.ao.schema.info
Interface FieldInfo<T>

Type Parameters:
T -

public interface FieldInfo<T>

A description of the field generated by the RawEntity

Since:
0.21
See Also:
FieldInfo

Field Summary
static com.google.common.base.Predicate<FieldInfo> HAS_GENERATOR
          A predicate for filtering fields with value generators
static com.google.common.base.Predicate<FieldInfo> IS_REQUIRED
          A predicate for filtering required fields
static com.google.common.base.Function<FieldInfo,String> PLUCK_NAME
          Return the name of the field
 
Method Summary
 Method getAccessor()
           
 Class<? extends ValueGenerator<? extends T>> getGeneratorType()
           
 Class<T> getJavaType()
           
 Method getMutator()
           
 String getName()
           
 String getPolymorphicName()
           
 TypeInfo<T> getTypeInfo()
           
 boolean hasAccessor()
           
 boolean hasAutoIncrement()
           
 boolean hasDefaultValue()
           
 boolean hasMutator()
           
 boolean isCacheable()
          Deprecated. since 0.25. Entities and values now no longer cached.
 boolean isNullable()
           
 boolean isPrimary()
           
 boolean isStorable()
           
 boolean isTransient()
           
 

Field Detail

IS_REQUIRED

static final com.google.common.base.Predicate<FieldInfo> IS_REQUIRED
A predicate for filtering required fields

See Also:
isNullable(), hasDefaultValue(), hasAutoIncrement()

HAS_GENERATOR

static final com.google.common.base.Predicate<FieldInfo> HAS_GENERATOR
A predicate for filtering fields with value generators

See Also:
getGeneratorType()

PLUCK_NAME

static final com.google.common.base.Function<FieldInfo,String> PLUCK_NAME
Return the name of the field

Method Detail

getName

String getName()
Returns:
the name of the column in the database.

getPolymorphicName

String getPolymorphicName()
Returns:
the polymorphic name for the field, if one exists
See Also:
Polymorphic

isPrimary

boolean isPrimary()
Returns:
true if the field is the primary key, false otherwise
See Also:
PrimaryKey

isNullable

boolean isNullable()
Returns:
true if the field is nullable, false otherwise
See Also:
NotNull

isStorable

boolean isStorable()
Returns:
true if a value corresponding to this field may be stored by the entity, false otherwise

isCacheable

boolean isCacheable()
Deprecated. since 0.25. Entities and values now no longer cached.


isTransient

boolean isTransient()
Returns:
true if the field is transient, false otherwise
See Also:
Transient

hasAutoIncrement

boolean hasAutoIncrement()
Returns:
true if the field an auto increment field, false otherwise
See Also:
AutoIncrement, PrimaryKey

hasDefaultValue

boolean hasDefaultValue()
Returns:
true if the field has a default value, false otherwise

getTypeInfo

TypeInfo<T> getTypeInfo()
Returns:
The database type information for the field

getJavaType

Class<T> getJavaType()
Returns:
the java type of the field

hasAccessor

boolean hasAccessor()
Returns:
true if the field has an accessor, false otherwise

getAccessor

Method getAccessor()
Returns:
the accessor if one exists
See Also:
hasAccessor()

hasMutator

boolean hasMutator()
Returns:
true if the field has an mutator, false otherwise

getMutator

Method getMutator()
Returns:
the mutator if one exists
See Also:
hasMutator()

getGeneratorType

Class<? extends ValueGenerator<? extends T>> getGeneratorType()
Returns:
the class of the value generator if one exists
See Also:
Generator


Copyright © 2007-2014. All Rights Reserved.