Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package net.java.ao.schema.info;
  
  
  import  javax.annotation.Nullable;
A description of the field generated by the net.java.ao.RawEntity

Parameters:
<T>
Since:
0.21
See also:
FieldInfo
 
 public interface FieldInfo<T>
 {

    

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

    

Returns:
the polymorphic name for the field, if one exists
See also:
net.java.ao.Polymorphic
 
     String getPolymorphicName();

    

Returns:
true if the field is the primary key, false otherwise
See also:
net.java.ao.schema.PrimaryKey
 
     boolean isPrimary();

    

Returns:
true if the field is nullable, false otherwise
See also:
net.java.ao.schema.NotNull
 
     boolean isNullable();

    

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

    

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

    

Returns:
true if the field is transient, false otherwise
See also:
net.java.ao.Transient
 
     boolean isTransient();

    

Returns:
true if the field an auto increment field, false otherwise
See also:
net.java.ao.schema.AutoIncrement
net.java.ao.schema.PrimaryKey
 
     boolean hasAutoIncrement();

    

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

    

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

    

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

    

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

    

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

    

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

    

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

    

Returns:
the class of the value generator if one exists
See also:
net.java.ao.Generator
    Class<? extends ValueGenerator<? extends T>> getGeneratorType();

    
A predicate for filtering required fields

See also:
isNullable()
hasDefaultValue()
hasAutoIncrement()
        @Override
        public boolean apply(FieldInfo fieldInfo) {
            return !(fieldInfo.isNullable() || fieldInfo.hasDefaultValue() || fieldInfo.hasAutoIncrement());
        }
    };

    
A predicate for filtering fields with value generators

See also:
getGeneratorType()
        @Override
        public boolean apply(FieldInfo fieldInfo) {
            return fieldInfo.getGeneratorType() != null;
        }
    };

    
Return the name of the field
        public String apply(FieldInfo fieldInfo) {
            return fieldInfo.getName();
        }
    };
New to GrepCode? Check out our FAQ X