com.vaadin.data.util.sqlcontainer
Class RowItem

java.lang.Object
  extended by com.vaadin.data.util.sqlcontainer.RowItem
All Implemented Interfaces:
Item, java.io.Serializable

public final class RowItem
extends java.lang.Object
implements Item

RowItem represents one row of a result set obtained from a QueryDelegate. Note that depending on the QueryDelegate in use this does not necessarily map into an actual row in a database table.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.data.Item
Item.Editor, Item.PropertySetChangeEvent, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer
 
Constructor Summary
RowItem(SQLContainer container, RowId id, java.util.Collection<ColumnProperty> properties)
           
 
Method Summary
 boolean addItemProperty(java.lang.Object id, Property property)
          Adding properties is not supported.
 void commit()
           
 SQLContainer getContainer()
           
 RowId getId()
           
 Property getItemProperty(java.lang.Object id)
          Gets the Property corresponding to the given Property ID stored in the Item.
 java.util.Collection<?> getItemPropertyIds()
          Gets the collection of IDs of all Properties stored in the Item.
 boolean isModified()
           
 boolean removeItemProperty(java.lang.Object id)
          Removing properties is not supported.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RowItem

public RowItem(SQLContainer container,
               RowId id,
               java.util.Collection<ColumnProperty> properties)
Method Detail

getItemProperty

public Property getItemProperty(java.lang.Object id)
Description copied from interface: Item
Gets the Property corresponding to the given Property ID stored in the Item. If the Item does not contain the Property, null is returned.

Specified by:
getItemProperty in interface Item
Parameters:
id - identifier of the Property to get
Returns:
the Property with the given ID or null

getItemPropertyIds

public java.util.Collection<?> getItemPropertyIds()
Description copied from interface: Item
Gets the collection of IDs of all Properties stored in the Item.

Specified by:
getItemPropertyIds in interface Item
Returns:
unmodifiable collection containing IDs of the Properties stored the Item

addItemProperty

public boolean addItemProperty(java.lang.Object id,
                               Property property)
                        throws java.lang.UnsupportedOperationException
Adding properties is not supported. Properties are generated by SQLContainer.

Specified by:
addItemProperty in interface Item
Parameters:
id - ID of the new Property
property - the Property to be added and associated with the id
Returns:
true if the operation succeeded, false if not
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported.

removeItemProperty

public boolean removeItemProperty(java.lang.Object id)
                           throws java.lang.UnsupportedOperationException
Removing properties is not supported. Properties are generated by SQLContainer.

Specified by:
removeItemProperty in interface Item
Parameters:
id - ID of the Property to be removed
Returns:
true if the operation succeeded
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported. false if not

getId

public RowId getId()

getContainer

public SQLContainer getContainer()

isModified

public boolean isModified()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

commit

public void commit()


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.