org.acegisecurity.domain.impl
Class AbstractPersistableEntity
java.lang.Object
org.acegisecurity.domain.impl.BusinessObject
org.acegisecurity.domain.impl.AbstractPersistableEntity
- All Implemented Interfaces:
- Serializable, Cloneable, PersistableEntity
- Direct Known Subclasses:
- PersistableEntityInteger, PersistableEntityLong
public abstract class AbstractPersistableEntity
- extends BusinessObject
- implements PersistableEntity
An abstract implementation of PersistableEntity.
- Version:
- $Id: AbstractPersistableEntity.java,v 1.5 2005/11/17 00:55:49 benalex Exp $
- Author:
- Ben Alex
- See Also:
- Serialized Form
|
Method Summary |
int |
getVersion()
Returns the version number, which should be managed by the persistence
layer. |
boolean |
isNew()
Indicates whether this persistable entity has been persisted yet. |
void |
setVersion(int version)
Sets the version numbers. |
STARTING_VERSION
public static final int STARTING_VERSION
- See Also:
- Constant Field Values
AbstractPersistableEntity
public AbstractPersistableEntity()
isNew
public boolean isNew()
- Indicates whether this persistable entity has been persisted yet.
Determine based on whether the
PersistableEntity.getInternalId() returns
null or a non-null value.
- Returns:
true if the instance has not been persisted,
false otherwise
getVersion
public int getVersion()
- Returns the version number, which should be managed by the persistence
layer.
Initially all PersistableEntitys will commence with the
version number defined by STARTING_VERSION.
- Returns:
- the version
setVersion
public void setVersion(int version)
- Sets the version numbers.
- Parameters:
version - the new version number to use
Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.