Class CompoundItem
java.lang.Object
com.denodo.scheduler.client.project.CompoundItem
- All Implemented Interfaces:
Item,Serializable,Comparable<Item>
Item of information that is compound by another items.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final longFor interoperability with possible future changes. -
Constructor Summary
ConstructorsConstructorDescriptionCompoundItem(int reference, String name, String type, boolean draft, Collection validTypes) CompoundItem(int reference, String name, String type, String subType, boolean draft, String description, Collection values, Collection validTypes) CompoundItem(int reference, String name, String type, String subType, boolean draft, Collection validTypes) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a new item by passing the request (add) along the item structure until an object handles it: when isValidType of item type is true.voidaddValidType(String validType) intDefines the order of a CompoundItem in a Collection: its names appears in alphabetic order grouped by type and subtype.booleanReturns whether an instance of this class is equals to the one passed as a parameter or not.find(int itemRef) Finds the given item by passing the request (find) along the item structure until an object handles it: when the item is itself or a direct descendant.getName()intgetType()inthashCode()Returns the hash code of an instance of this class.booleanisDraft()booleanisEmpty()booleanisValidType(String valueType) booleanremove(int itemRef) Removes the given item by passing the request (remove) along the item structure until an object handles it: when the item is a direct descendant.voidsetDescription(String description) voidsetDraft(boolean draft) voidvoidsetSubType(String subType) voidtoString()booleanUpdates the given item by passing the request (update) along the item structure until an object handles it: when the item is a direct descendant.
-
Field Details
-
serialVersionUID
protected static final long serialVersionUIDFor interoperability with possible future changes.- See Also:
-
-
Constructor Details
-
CompoundItem
public CompoundItem() -
CompoundItem
-
CompoundItem
public CompoundItem(int reference, String name, String type, String subType, boolean draft, Collection validTypes) -
CompoundItem
public CompoundItem(int reference, String name, String type, String subType, boolean draft, String description, Collection values, Collection validTypes)
-
-
Method Details
-
getReference
public int getReference()- Specified by:
getReferencein interfaceItem- Returns:
- the reference
-
getType
-
setType
- Parameters:
type- the type to set
-
getName
-
setName
-
getSubType
- Specified by:
getSubTypein interfaceItem- Returns:
- the subType
-
setSubType
- Parameters:
subType- the subType to set
-
isDraft
public boolean isDraft() -
setDraft
public void setDraft(boolean draft) -
getDescription
- Specified by:
getDescriptionin interfaceItem- Returns:
- the description
-
setDescription
- Specified by:
setDescriptionin interfaceItem- Parameters:
description- the description to set
-
add
Adds a new item by passing the request (add) along the item structure until an object handles it: when isValidType of item type is true. -
find
Finds the given item by passing the request (find) along the item structure until an object handles it: when the item is itself or a direct descendant. -
update
Updates the given item by passing the request (update) along the item structure until an object handles it: when the item is a direct descendant. -
remove
public boolean remove(int itemRef) Removes the given item by passing the request (remove) along the item structure until an object handles it: when the item is a direct descendant. -
isEmpty
public boolean isEmpty() -
getValues
-
addValidType
- Specified by:
addValidTypein interfaceItem
-
isValidType
- Specified by:
isValidTypein interfaceItem
-
getValidTypes
- Specified by:
getValidTypesin interfaceItem
-
hashCode
public int hashCode()Returns the hash code of an instance of this class. The resulting hash code is the sum of the name and value hash codes. -
equals
Returns whether an instance of this class is equals to the one passed as a parameter or not. This method returns true if the name and the value are equal for both parameters. Returns false otherwise. -
compareTo
Defines the order of a CompoundItem in a Collection: its names appears in alphabetic order grouped by type and subtype. For comparing the Strings aCollatorofTERTIARYstrength dependent on the configured locales is used.- Specified by:
compareToin interfaceComparable<Item>
-
toString
-