public class Layout extends java.lang.Object implements java.lang.Iterable<FieldDefinition>
Layout
specifies the list of fields of a table.Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares this layout to the specified object.
|
GUID |
findFieldUID(int shortID)
Returns the field UID for the given short ID.
|
Catalog |
getCatalog()
Returns the catalog for the table of this layout.
|
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. |
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.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. |
int |
hashCode() |
java.util.Iterator<FieldDefinition> |
iterator()
Return an iterator that iterates over all
field definitions in this collection. |
boolean |
supportsSubscriptions()
Returns whether the table of this layout supports item subscriptions.
|
public GUID findFieldUID(int shortID)
shortID
- shortID of the fieldInvalidArgumentException
- in case of an non-found short IDpublic 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 boolean hasFieldDefinition(GUID fieldUID)
UID
is contained in this layout.fieldUID
- the UID of the fieldUID
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.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 Catalog getCatalog()
public java.lang.String getTableName()
public boolean supportsSubscriptions()
true
if the table of this layout supports item subscriptions, otherwise false
public java.util.Iterator<FieldDefinition> iterator()
field definitions
in this collection. 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.
iterator
in interface java.lang.Iterable<FieldDefinition>
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.