public class MultiLayout
extends java.lang.Object
Layout
while working on multiple catalogs. This class makes no guarantees which catalog
will generate the FieldDefinition
objects which are returned by some of the implemented methods.Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares this layout to the specified object.
|
CumulusSession |
getCumulusSession()
Returns the current
CumulusSession object. |
FieldDefinition |
getFieldDefinition(GUID fieldUID)
Returns the
FieldDefinition for the specified fieldUID or throws an Exception if that field is
not contained in this layout (read: in any of the catalogs of the MultiItemCollection ). |
java.util.Map<java.lang.Integer,FieldDefinition> |
getFieldDefinitions(GUID fieldUID)
Returns the
FieldDefinition instances for the specified fieldUID of all catalogs. |
java.util.Set<GUID> |
getFieldUIDs()
Returns the set of field
UIDs that are contained in this layout. |
java.util.Set<GUID> |
getFieldUIDs(boolean includeVirtualFieldUIDs)
Returns the set of field
UIDs that are contained in this layout. |
java.util.Set<GUID> |
getFieldUIDs(boolean includeVirtualFieldUIDs,
boolean inAllCatalogs)
Returns the set of field
UIDs that are contained in this layout. |
java.lang.String |
getTableName()
Returns the table name of the table of this layout.
|
boolean |
hasFieldDefinition(GUID fieldUID)
Returns whether the field with the specified
UID is contained in this layout (read: in any of the catalog layouts of this
MultiItemCollection . |
boolean |
hasFieldDefinition(GUID fieldUID,
boolean inAllCatalogs)
Returns whether the field with the specified
UID is contained in this layout. |
int |
hashCode() |
java.util.Iterator<FieldDefinition> |
iterator()
Return an iterator that iterates over all
field definitions of this collection. |
public java.util.Set<GUID> getFieldUIDs()
UIDs
that are contained in this layout.UIDs
without virtual field UIDs for base fields of multiple languages fieldspublic java.util.Set<GUID> getFieldUIDs(boolean includeVirtualFieldUIDs)
UIDs
that are contained in this layout.includeVirtualFieldUIDs
- whether the virtual field UID for the base language of a multiple languages field should be includedUIDs
public java.util.Set<GUID> getFieldUIDs(boolean includeVirtualFieldUIDs, boolean inAllCatalogs)
UIDs
that are contained in this layout.includeVirtualFieldUIDs
- whether the virtual field UID for the base language of a multiple languages field should be includedinAllCatalogs
- true if only fields available in all catalogs should be returnedUIDs
public boolean hasFieldDefinition(GUID fieldUID)
UID
is contained in this layout (read: in any of the catalog layouts of this
MultiItemCollection
.fieldUID
- the UID of the fieldUID
is contained in this layoutpublic boolean hasFieldDefinition(GUID fieldUID, boolean inAllCatalogs)
UID
is contained in this layout.fieldUID
- the UID of the fieldinAllCatalogs
- true if the field should exist in all catalogsUID
is contained in this layoutpublic FieldDefinition getFieldDefinition(GUID fieldUID) throws InvalidArgumentException
FieldDefinition
for the specified fieldUID
or throws an Exception if that field is
not contained in this layout (read: in any of the catalogs of the MultiItemCollection
).fieldUID
- the field to get the FieldDefinition
forFieldDefinition
for the specified fieldUID
InvalidArgumentException
- if the given fieldUID
is not valid for this layoutpublic java.util.Map<java.lang.Integer,FieldDefinition> getFieldDefinitions(GUID fieldUID) throws InvalidArgumentException
FieldDefinition
instances for the specified fieldUID
of all catalogs.fieldUID
- the field to get the FieldDefinition
forFieldDefinition
for the specified fieldUID
InvalidArgumentException
- if the given fieldUID
is not valid for this layoutpublic CumulusSession getCumulusSession()
CumulusSession
object.CumulusSession
object.public java.lang.String getTableName()
public java.util.Iterator<FieldDefinition> iterator()
field definitions
of this collection. This includes also FieldDefinition
instances which are only contained in some catalogs. This allows you to use Java 5 for-each loops that simplify your source code:
for (FieldDefinition fieldDefinition : layout) { // use the fieldDefinition }The iterator returned does not support the remove operation.
field definitions
in this layout.public boolean equals(java.lang.Object o)
true
if and only if the argument is not null
and is a Layout
object
that represents the same layout as this object.equals
in class java.lang.Object
o
- the object to comparetrue
if the layout are equal; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.