com.flexive.shared.content
Class FxCachedContentContainer

java.lang.Object
  extended by com.flexive.shared.content.FxCachedContentContainer
All Implemented Interfaces:
java.io.Serializable

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

Content Container for the Cache to keep all versions for an id. This class is used internally and does only contain versions that have been previously requested! To load all available versions use FxContentContainer

Version:
$Rev: 654 $
Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
FxContentContainer, Serialized Form

Constructor Summary
FxCachedContentContainer(FxCachedContent content)
          Ctor
 
Method Summary
 void add(FxCachedContent content)
          Add a content to the cache if - and only if - the id matches and its not contained already
 FxCachedContent get(FxPK pk)
          Try to get a content by its primary key, will return null if not found
 long getId()
          Getter for the id
 int getLiveVersion()
          Getter for the live version number
 int getMaxVersion()
          Getter for the max.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxCachedContentContainer

public FxCachedContentContainer(FxCachedContent content)
Ctor

Parameters:
content - the content to cache (and its security info)
Method Detail

getId

public long getId()
Getter for the id

Returns:
id

getMaxVersion

public int getMaxVersion()
Getter for the max. version number

Returns:
max. version number

getLiveVersion

public int getLiveVersion()
Getter for the live version number

Returns:
live version number

get

public FxCachedContent get(FxPK pk)
Try to get a content by its primary key, will return null if not found

Parameters:
pk - primary key
Returns:
content

add

public void add(FxCachedContent content)
Add a content to the cache if - and only if - the id matches and its not contained already

Parameters:
content - the content to add