exedio cope

com.exedio.cope
Class DateField

java.lang.Object
  extended by com.exedio.cope.Feature
      extended by com.exedio.cope.Field<E>
          extended by com.exedio.cope.FunctionField<Date>
              extended by com.exedio.cope.DateField
All Implemented Interfaces:
Function<Date>, Selectable<Date>, Settable<Date>

public final class DateField
extends FunctionField<Date>


Constructor Summary
DateField()
           
 
Method Summary
 DateField copy()
           
 DateField defaultTo(Date defaultConstant)
           
 DateField defaultToNow()
           
 List<Wrapper> getWrappers()
           
 boolean isDefaultNow()
           
 boolean isInitial()
          Returns true, if a value for the field should be specified on the creation of an item.
 DateField nonUnique()
           
 DateField optional()
          Returns a new Field, that differs from this Field by being optional.
 DateField toFinal()
          Returns a new Field, that differs from this Field by being final.
 void touch(Item item)
           
 DateField unique()
          Returns a new FunctionField, that differs from this FunctionField by being unique.
 
Methods inherited from class com.exedio.cope.FunctionField
append, appendParameter, appendSelect, between, bind, check, copyFunctionField, equal, equal, equal, get, getDefaultConstant, getImplicitUniqueConstraint, getInitialExceptions, getInitialType, getUniqueConstraints, greater, greater, greaterOrEqual, greaterOrEqual, in, in, isNotNull, isNull, less, less, lessOrEqual, lessOrEqual, max, min, notEqual, notEqual, searchUnique, searchUnique, set
 
Methods inherited from class com.exedio.cope.Field
castCollection, check, execute, getColumnName, getPattern, getPatterns, getValueClass, isFinal, isMandatory, map, mapNull
 
Methods inherited from class com.exedio.cope.Feature
getAnnotation, getID, getName, getType, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.exedio.cope.Function
getValueClass
 
Methods inherited from interface com.exedio.cope.Selectable
getType, toString
 

Constructor Detail

DateField

public DateField()
Method Detail

copy

public DateField copy()
Specified by:
copy in class FunctionField<Date>

toFinal

public DateField toFinal()
Description copied from class: Field
Returns a new Field, that differs from this Field by being final. If this Field is already final, the the result is equal to this Field.

Specified by:
toFinal in class Field<Date>
See Also:
Field.isFinal()

optional

public DateField optional()
Description copied from class: Field
Returns a new Field, that differs from this Field by being optional. If this Field is already optional, the the result is equal to this Field.

Specified by:
optional in class Field<Date>
See Also:
Field.isMandatory()

unique

public DateField unique()
Description copied from class: FunctionField
Returns a new FunctionField, that differs from this FunctionField by being unique. If this FunctionField is already unique, the the result is equal to this FunctionField.

Specified by:
unique in class FunctionField<Date>
See Also:
FunctionField.getImplicitUniqueConstraint()

nonUnique

public DateField nonUnique()
Specified by:
nonUnique in class FunctionField<Date>

defaultTo

public DateField defaultTo(Date defaultConstant)

defaultToNow

public DateField defaultToNow()

isDefaultNow

public boolean isDefaultNow()

getWrappers

public List<Wrapper> getWrappers()
Overrides:
getWrappers in class FunctionField<Date>

isInitial

public boolean isInitial()
Returns true, if a value for the field should be specified on the creation of an item. This implementation returns (isFinal() || isMandatory()) && getDefaultConstant()==null && ! isDefaultNow().

Specified by:
isInitial in interface Settable<Date>
Overrides:
isInitial in class FunctionField<Date>

touch

public void touch(Item item)
           throws UniqueViolationException,
                  FinalViolationException
Throws:
FinalViolationException - if this field is final.
UniqueViolationException

Cope with
Object
Persistence

SourceForge.net LogoCopyright © 2004-2008 exedio Gesellschaft für Softwareentwicklung mbH. All rights reserved.
svn.12752 build.5319 20090312135114