org.tolven.app.entity
Class MenuDataVersion

java.lang.Object
  extended by org.tolven.app.entity.MenuDataVersion
All Implemented Interfaces:
java.io.Serializable

public class MenuDataVersion
extends java.lang.Object
implements java.io.Serializable

This entity contains a denomalized representation of a version number for each "collection" represented in MenuData. This entity is always populated as a side-effect of updating or adding a new MenuData entity by removing the trailing number and dash of the full path of the menuData item.

The resulting key should correspond to the "elementId" we maintain in the application for collections. The version number maintained here represents the version of the collection which can be stored in the client and then used to determine if a change has occurred that requires the client to requery the actual collection.

Although we maintain this entity transactionally, the data itself should not be used to determine official transaction behavior. For example, the version number itself is not an official indication that the underlying data has actually changed, only that a UI should consider refreshing the query of the underlying data if the version number in the table is newer than what the client has. Think of this table as completely optional. Also, if a list has been defined by MenuStructure but has not been populated with any MenuData, then no entry for it will exists in this table (version 1 is the lowest version in this table). If this entity is eventually expanded to contain an approximate count of the number of rows in the underlying list, then version 0 might be possible depending on the method of counting. But again, the count is not official and not a substitute for actually counting the rows. Also, the "approximate row count" can be assumed to be zero if no entry exists in this table.

Author:
John Churin
See Also:
Serialized Form

Constructor Summary
MenuDataVersion()
           
 
Method Summary
 Account getAccount()
           
 java.lang.String getElement()
          The id of the list.
 long getId()
           
 java.util.Date getMaxDate()
           
 java.util.Date getMinDate()
           
 java.lang.String getRole()
           
 long getVersion()
          A version number incremented when an item is added to or removed from the list or if any item on the list is modified for any reason.
 void setAccount(Account account)
          Account that owns the list we are keeping track of.
 void setElement(java.lang.String element)
           
 void setId(long id)
           
 void setMaxDate(java.util.Date maxDate)
           
 void setMinDate(java.util.Date minDate)
           
 void setRole(java.lang.String role)
           
 void setVersion(long version)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuDataVersion

public MenuDataVersion()
Method Detail

getAccount

public Account getAccount()

setAccount

public void setAccount(Account account)
Account that owns the list we are keeping track of.

Parameters:
account -

getElement

public java.lang.String getElement()
The id of the list. This matches what the UI provides to the server when requesting a given list.

Returns:

setElement

public void setElement(java.lang.String element)

getId

public long getId()

setId

public void setId(long id)

getVersion

public long getVersion()
A version number incremented when an item is added to or removed from the list or if any item on the list is modified for any reason. This is an "unofficial" version number used by UIs, for display control.

Returns:

setVersion

public void setVersion(long version)

getMinDate

public java.util.Date getMinDate()

setMinDate

public void setMinDate(java.util.Date minDate)

getMaxDate

public java.util.Date getMaxDate()

setMaxDate

public void setMaxDate(java.util.Date maxDate)

getRole

public java.lang.String getRole()

setRole

public void setRole(java.lang.String role)