Package com.exedio.cope
Class ItemField<E extends Item>
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Field<E>
com.exedio.cope.FunctionField<E>
com.exedio.cope.ItemField<E>
- All Implemented Interfaces:
Copyable
,Function<E>
,ItemFunction<E>
,Selectable<E>
,Settable<E>
,Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendSelect
(com.exedio.cope.Statement bf, Join join) Deprecated.For internal use within COPE only.void
appendType
(com.exedio.cope.Statement bf, Join join) Deprecated.For internal use within COPE only.cascade()
Deprecated.Useas(Class)
insteadint
Deprecated.long
Causes this ItemField to create achoice constraint
.copy()
copyTo
(FunctionField<?> copyTo) create
(Class<E> valueClass, ItemField.DeletePolicy policy) create
(Class<E> valueClass, TypeFuture<E> valueType, ItemField.DeletePolicy policy) Deprecated.defaults make no sense for ItemFieldDeprecated.UseSchemaInfo.getTypeColumnName(ItemField)
insteadReturns the type of items, this field accepts instances of.getValueType
(Model model) Returns the same value asgetValueType()
for the model this field (and itstype
) is part of.boolean
Returns a new FunctionField that differs from this FunctionField by having nocopyFrom
fields set.nullify()
Additionally makes the fieldoptional
.optional()
Returns a new Field, that differs from this Field by being optional.toFinal()
Returns a new Field, that differs from this Field by being final.unique()
Returns a new FunctionField, that differs from this FunctionField by being unique.Methods inherited from class com.exedio.cope.FunctionField
addCopyFrom, append, check, copy, copyFunctionField, get, get, getDefaultConstant, getImplicitCopyConstraint, getImplicitCopyConstraints, getImplicitUniqueConstraint, getInitialExceptions, getUniqueConstraints, hasDefault, isInitial, isRedundantByCopyConstraint, searchUnique, searchUnique, searchUniqueStrict, set
Methods inherited from class com.exedio.cope.Field
castCollection, check, execute, getColumnName, getInitialType, getPatterns, getValueClass, isFinal, isMandatory, mapNull
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, getType, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
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
any, between, equal, equal, equal, get, get, greater, greater, greaterOrEqual, greaterOrEqual, in, in, isNotNull, isNull, less, less, lessOrEqual, lessOrEqual, max, min, notEqual, notEqual
Methods inherited from interface com.exedio.cope.ItemFunction
bind, equalTarget, equalTarget, instanceOf, instanceOf, instanceOf, instanceOf, instanceOf, notInstanceOf, notInstanceOf, notInstanceOf, notInstanceOf, notInstanceOf, typeIn, typeIn, typeIn, typeIn, typeIn, typeNotIn, typeNotIn, typeNotIn, typeNotIn, typeNotIn
Methods inherited from interface com.exedio.cope.Selectable
append, check, getType, getValueClass, toString
-
Method Details
-
create
-
create
public static <E extends Item> ItemField<E> create(Class<E> valueClass, ItemField.DeletePolicy policy) -
create
public static <E extends Item> ItemField<E> create(Class<E> valueClass, TypeFuture<E> valueType, ItemField.DeletePolicy policy) -
copy
- Specified by:
copy
in classFunctionField<E extends Item>
-
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 classFunctionField<E extends Item>
- See Also:
-
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 classFunctionField<E extends Item>
- See Also:
-
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 classFunctionField<E extends Item>
- See Also:
-
nonUnique
- Specified by:
nonUnique
in classFunctionField<E extends Item>
-
copyFrom
- Specified by:
copyFrom
in classFunctionField<E extends Item>
- See Also:
-
copyTo
- See Also:
-
noCopyFrom
Description copied from class:FunctionField
Returns a new FunctionField that differs from this FunctionField by having nocopyFrom
fields set.- Specified by:
noCopyFrom
in classFunctionField<E extends Item>
-
choice
Causes this ItemField to create achoice constraint
.This ItemField becomes the
target
of the copy constraint. The field pointing back becomes thetemplate
, andType.getThis()
of the type of this ItemField becomes thecopy
.- Parameters:
backPointerName
- the name of the field pointing back; atE
, this has to be the name of anItemField
where thevalue type
overlaps with this item field'sFeature.getType()
-
noDefault
- Specified by:
noDefault
in classFunctionField<E extends Item>
-
nullify
Additionally makes the fieldoptional
. -
cascade
-
defaultTo
Deprecated.defaults make no sense for ItemField- Specified by:
defaultTo
in classFunctionField<E extends Item>
-
getChoice
-
as
-
asExtends
- See Also:
-
asSuper
- See Also:
-
getDeletePolicy
-
getValueType
Returns the type of items, this field accepts instances of.- Specified by:
getValueType
in interfaceItemFunction<E extends Item>
- Specified by:
getValueType
in interfaceSelectable<E extends Item>
-
getValueType
Returns the same value asgetValueType()
for the model this field (and itstype
) is part of. For other models it returns the same value asgetValueType()
if this field (and itstype
) had been added to that model. -
appendSelect
Deprecated.For internal use within COPE only.- Specified by:
appendSelect
in interfaceSelectable<E extends Item>
- Overrides:
appendSelect
in classFunctionField<E extends Item>
-
appendType
Deprecated.For internal use within COPE only.- Specified by:
appendType
in interfaceItemFunction<E extends Item>
-
needsCheckTypeColumn
public boolean needsCheckTypeColumn()- Specified by:
needsCheckTypeColumn
in interfaceItemFunction<E extends Item>
- See Also:
-
checkTypeColumnL
public long checkTypeColumnL()- Specified by:
checkTypeColumnL
in interfaceItemFunction<E extends Item>
- See Also:
-
checkTypeColumn
Deprecated.- Specified by:
checkTypeColumn
in interfaceItemFunction<E extends Item>
-
cast
Deprecated.Useas(Class)
instead -
getTypeColumnName
Deprecated.UseSchemaInfo.getTypeColumnName(ItemField)
instead
-