exedio cope

com.exedio.cope
Class StringField

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

public final class StringField
extends FunctionField<String>
implements StringFunction

Represents a field within a type, that enables instances of that type to store a string.

Author:
Ralf Wiebicke

Field Summary
static int DEFAULT_LENGTH
           
 
Constructor Summary
StringField()
          Creates a new mandatory StringField.
 
Method Summary
 BindStringFunction bind(Join join)
           
 StringField characterSet(com.exedio.cope.util.CharacterSet characterSet)
          Deprecated. Use charSet(CharSet) instead
 StringField charSet(com.exedio.cope.util.CharSet charSet)
           
 LikeCondition contains(String value)
          Returns a condition, that is true for all items, if and only if the value of this function for that item contains the given parameter.
 LikeCondition containsIgnoreCase(String value)
           
 StringField copy()
           
 StringField defaultTo(String defaultConstant)
           
 LikeCondition endsWith(String value)
          Returns a condition, that is true for all items, if and only if the value of this function for that item ends with the given parameter.
 LikeCondition endsWithIgnoreCase(String value)
           
 Condition equalIgnoreCase(String value)
           
 com.exedio.cope.util.CharacterSet getCharacterSet()
          Deprecated. Use getCharSet() instead
 com.exedio.cope.util.CharSet getCharSet()
           
 Set<Class<? extends Throwable>> getInitialExceptions()
          Returns the exceptions possibly thrown, when setting a value for this settable.
 int getMaximumLength()
           
 int getMinimumLength()
           
 LengthView length()
           
 StringField lengthExact(int exactLength)
           
 StringField lengthMax(int maximumLength)
           
 StringField lengthMaxUnchecked(int maximumLength)
          Deprecated. use lengthMax(int).
 StringField lengthMin(int minimumLength)
           
 StringField lengthRange(int minimumLength, int maximumLength)
           
 LikeCondition like(String value)
          Returns a condition, that is true for all items, if and only if the value of this function for that item is matches the given parameter.
 LikeCondition likeIgnoreCase(String value)
           
 StringField nonUnique()
           
 StringField optional()
          Returns a new Field, that differs from this Field by being optional.
 LikeCondition startsWith(String value)
          Returns a condition, that is true for all items, if and only if the value of this function for that item starts with the given parameter.
 LikeCondition startsWithIgnoreCase(String value)
           
 StringField toFinal()
          Returns a new Field, that differs from this Field by being final.
 UppercaseView toUpperCase()
           
 StringField unique()
          Returns a new FunctionField, that differs from this FunctionField by being unique.
 UppercaseView uppercase()
          Deprecated. renamed to toUpperCase()
 
Methods inherited from class com.exedio.cope.FunctionField
append, appendParameter, appendSelect, between, check, copyFunctionField, equal, equal, equal, get, getDefaultConstant, getImplicitUniqueConstraint, getInitialType, getUniqueConstraints, getWrappers, greater, greater, greaterOrEqual, greaterOrEqual, in, in, isInitial, 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
appendParameter, between, equal, equal, equal, get, getValueClass, greater, greater, greaterOrEqual, greaterOrEqual, in, in, isNotNull, isNull, less, less, lessOrEqual, lessOrEqual, max, min, notEqual, notEqual
 
Methods inherited from interface com.exedio.cope.Selectable
append, appendSelect, check, getType, toString
 

Field Detail

DEFAULT_LENGTH

public static final int DEFAULT_LENGTH
See Also:
Constant Field Values
Constructor Detail

StringField

public StringField()
Creates a new mandatory StringField.

Method Detail

copy

public StringField copy()
Specified by:
copy in class FunctionField<String>

toFinal

public StringField 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<String>
See Also:
Field.isFinal()

optional

public StringField 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<String>
See Also:
Field.isMandatory()

unique

public StringField 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<String>
See Also:
FunctionField.getImplicitUniqueConstraint()

nonUnique

public StringField nonUnique()
Specified by:
nonUnique in class FunctionField<String>

defaultTo

public StringField defaultTo(String defaultConstant)

lengthRange

public StringField lengthRange(int minimumLength,
                               int maximumLength)

lengthMin

public StringField lengthMin(int minimumLength)

lengthMax

public StringField lengthMax(int maximumLength)

lengthExact

public StringField lengthExact(int exactLength)

charSet

public StringField charSet(com.exedio.cope.util.CharSet charSet)

getMinimumLength

public final int getMinimumLength()

getMaximumLength

public final int getMaximumLength()

getCharSet

public final com.exedio.cope.util.CharSet getCharSet()

getInitialExceptions

public Set<Class<? extends Throwable>> getInitialExceptions()
Description copied from interface: Settable
Returns the exceptions possibly thrown, when setting a value for this settable.

Specified by:
getInitialExceptions in interface Settable<String>
Overrides:
getInitialExceptions in class FunctionField<String>

like

public final LikeCondition like(String value)
Description copied from interface: StringFunction
Returns a condition, that is true for all items, if and only if the value of this function for that item is matches the given parameter.

Specified by:
like in interface StringFunction

startsWith

public final LikeCondition startsWith(String value)
Description copied from interface: StringFunction
Returns a condition, that is true for all items, if and only if the value of this function for that item starts with the given parameter.

Specified by:
startsWith in interface StringFunction

endsWith

public final LikeCondition endsWith(String value)
Description copied from interface: StringFunction
Returns a condition, that is true for all items, if and only if the value of this function for that item ends with the given parameter.

Specified by:
endsWith in interface StringFunction

contains

public final LikeCondition contains(String value)
Description copied from interface: StringFunction
Returns a condition, that is true for all items, if and only if the value of this function for that item contains the given parameter.

Specified by:
contains in interface StringFunction

length

public final LengthView length()
Specified by:
length in interface StringFunction

toUpperCase

public final UppercaseView toUpperCase()
Specified by:
toUpperCase in interface StringFunction

equalIgnoreCase

public final Condition equalIgnoreCase(String value)
Specified by:
equalIgnoreCase in interface StringFunction

likeIgnoreCase

public final LikeCondition likeIgnoreCase(String value)
Specified by:
likeIgnoreCase in interface StringFunction

startsWithIgnoreCase

public final LikeCondition startsWithIgnoreCase(String value)
Specified by:
startsWithIgnoreCase in interface StringFunction

endsWithIgnoreCase

public final LikeCondition endsWithIgnoreCase(String value)
Specified by:
endsWithIgnoreCase in interface StringFunction

containsIgnoreCase

public final LikeCondition containsIgnoreCase(String value)
Specified by:
containsIgnoreCase in interface StringFunction

bind

public BindStringFunction bind(Join join)
Specified by:
bind in interface Function<String>
Specified by:
bind in interface StringFunction
Overrides:
bind in class FunctionField<String>

lengthMaxUnchecked

@Deprecated
public StringField lengthMaxUnchecked(int maximumLength)
Deprecated. use lengthMax(int).


uppercase

@Deprecated
public final UppercaseView uppercase()
Deprecated. renamed to toUpperCase()


characterSet

@Deprecated
public StringField characterSet(com.exedio.cope.util.CharacterSet characterSet)
Deprecated. Use charSet(CharSet) instead


getCharacterSet

@Deprecated
public com.exedio.cope.util.CharacterSet getCharacterSet()
Deprecated. Use getCharSet() instead


Cope with
Object
Persistence

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