local.tomas.hibernate
Class PersistenceVersion

java.lang.Object
  extended by local.tomas.hibernate.PersistenceVersion
All Implemented Interfaces:
Comparable<PersistenceVersion>

public class PersistenceVersion
extends Object
implements Comparable<PersistenceVersion>

Bean storing entity versions.

Author:
tomas

Constructor Summary
PersistenceVersion()
          Default constructor.
PersistenceVersion(String name, String version)
          Construct from entity name and version.
 
Method Summary
 int compareTo(PersistenceVersion o)
          Compare versions.
 String getName()
          Get the entity name.
 String getVersion()
          Get the version.
 void setName(String name)
          Set the entity name.
 void setVersion(String version)
          Set the version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceVersion

public PersistenceVersion()
Default constructor.


PersistenceVersion

public PersistenceVersion(String name,
                          String version)
Construct from entity name and version.

Parameters:
name - entity name
version - version
Method Detail

getName

public String getName()
Get the entity name.

Returns:
Returns the name.

setName

public void setName(String name)
Set the entity name.

Parameters:
name - The name to set.

getVersion

public String getVersion()
Get the version.

Returns:
Returns the version.

setVersion

public void setVersion(String version)
Set the version.

Parameters:
version - The version to set.

compareTo

public int compareTo(PersistenceVersion o)
Compare versions.

Specified by:
compareTo in interface Comparable<PersistenceVersion>
Parameters:
o - other version
Returns:
-1 if this version less than other, 1 if this one greater than other, 0 if equal


Copyright © 2012. All Rights Reserved.