ch.hsr.bieridee.models
Class AbstractActionModel
java.lang.Object
ch.hsr.bieridee.models.AbstractModel
ch.hsr.bieridee.models.AbstractActionModel
- Direct Known Subclasses:
- ConsumptionModel, RatingModel
public abstract class AbstractActionModel
- extends AbstractModel
Abstract class for action models (consumtion and rating).
Constructor Summary |
AbstractActionModel(java.lang.String type,
org.neo4j.graphdb.Node node)
Basic constructor of the ActionModel from a node. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractActionModel
public AbstractActionModel(java.lang.String type,
org.neo4j.graphdb.Node node)
throws org.neo4j.graphdb.NotFoundException,
WrongNodeTypeException
- Basic constructor of the ActionModel from a node.
- Parameters:
type
- Type of the nodenode
- The action node, consumtion or rating
- Throws:
org.neo4j.graphdb.NotFoundException
- Thrown if the given node can not be found
WrongNodeTypeException
- Thrown if the given node is not of type user
getType
public java.lang.String getType()
getDate
public java.util.Date getDate()
getBeer
public BeerModel getBeer()
getUser
public UserModel getUser()
getSecondsAgo
public long getSecondsAgo()
- Returns:
- number of seconds ago the action was created.