exedio cope

com.exedio.cope.pattern
Class LimitedListField<E>

java.lang.Object
  extended by com.exedio.cope.Feature
      extended by com.exedio.cope.Pattern
          extended by com.exedio.cope.pattern.LimitedListField<E>
All Implemented Interfaces:
Settable<Collection<E>>

public final class LimitedListField<E>
extends Pattern
implements Settable<Collection<E>>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.exedio.cope.Pattern
Pattern.BackedItem
 
Method Summary
 Condition contains(E value)
           
 Condition equal(Collection<E> value)
           
 SetValue[] execute(Collection value, Item exceptionItem)
           
 List<E> get(Item item)
           
 Set<Class<? extends Throwable>> getInitialExceptions()
          Returns the exceptions possibly thrown, when setting a value for this settable.
 Class getInitialType()
           
 List<FunctionField<E>> getSourceFields()
           
 List<FunctionField<E>> getSources()
          Deprecated. Use getSourceFields() instead
 List<Wrapper> getWrappers()
           
 boolean isFinal()
          Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.
 boolean isInitial()
          Returns true, if a value for the settable should be specified on the creation of an item.
 SetValue<Collection<E>> map(Collection<E> value)
           
static
<E> LimitedListField<E>
newList(FunctionField<E> source1, FunctionField<E> source2)
           
static
<E> LimitedListField<E>
newList(FunctionField<E> source1, FunctionField<E> source2, FunctionField<E> source3)
           
static
<E> LimitedListField<E>
newList(FunctionField<E> template, int maximumSize)
           
 Condition notEqual(Collection<E> value)
           
 void set(Item item, Collection<? extends E> value)
           
 
Methods inherited from class com.exedio.cope.Pattern
addSource, getGeneratedTypes, getSourceTypes, getType, initialize, newSourceType, newSourceType, newType, newType, registerSource
 
Methods inherited from class com.exedio.cope.Feature
getAnnotation, getID, getName, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newList

public static final <E> LimitedListField<E> newList(FunctionField<E> source1,
                                                    FunctionField<E> source2)

newList

public static final <E> LimitedListField<E> newList(FunctionField<E> source1,
                                                    FunctionField<E> source2,
                                                    FunctionField<E> source3)

newList

public static final <E> LimitedListField<E> newList(FunctionField<E> template,
                                                    int maximumSize)

getSourceFields

public List<FunctionField<E>> getSourceFields()
Overrides:
getSourceFields in class Pattern
See Also:
Field.getPattern()

getWrappers

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

isInitial

public boolean isInitial()
Description copied from interface: Settable
Returns true, if a value for the settable should be specified on the creation of an item.

Specified by:
isInitial in interface Settable<Collection<E>>

isFinal

public boolean isFinal()
Description copied from interface: Settable
Returns true, if a value for the settable can be specified on the creation of an item only, thus cannot be modified later.

Specified by:
isFinal in interface Settable<Collection<E>>

getInitialType

public Class getInitialType()
Specified by:
getInitialType in interface Settable<Collection<E>>

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<Collection<E>>

get

public List<E> get(Item item)

set

public void set(Item item,
                Collection<? extends E> value)
         throws UniqueViolationException,
                MandatoryViolationException,
                StringLengthViolationException,
                FinalViolationException,
                ClassCastException
Throws:
UniqueViolationException
MandatoryViolationException
StringLengthViolationException
FinalViolationException
ClassCastException

map

public SetValue<Collection<E>> map(Collection<E> value)
Specified by:
map in interface Settable<Collection<E>>

execute

public SetValue[] execute(Collection value,
                          Item exceptionItem)
Specified by:
execute in interface Settable<Collection<E>>

equal

public Condition equal(Collection<E> value)

notEqual

public Condition notEqual(Collection<E> value)

contains

public Condition contains(E value)

getSources

@Deprecated
public List<FunctionField<E>> getSources()
Deprecated. Use getSourceFields() instead

Overrides:
getSources in class Pattern

Cope with
Object
Persistence

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