|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.hsr.bieridee.models.AbstractModel
ch.hsr.bieridee.models.BeertypeModel
public class BeertypeModel
Model to work and persist the beertype object.
Constructor Summary | |
---|---|
BeertypeModel(long beertypeId)
Creates a BeertypeModel . |
|
BeertypeModel(org.neo4j.graphdb.Node node)
Creates a BeertypeModel . |
Method Summary | |
---|---|
static BeertypeModel |
create(java.lang.String name,
java.lang.String description)
|
boolean |
equals(java.lang.Object obj)
|
static java.util.List<BeertypeModel> |
getAll()
Gets a list of all beertypes as beertypeModel . |
java.lang.String |
getDescription()
|
Beertype |
getDomainObject()
|
long |
getId()
|
java.lang.String |
getName()
|
org.neo4j.graphdb.Node |
getNode()
|
static BeertypeModel |
getUnknown()
Gets the BeertypeModel for an unknown beertype. |
int |
hashCode()
|
boolean |
isUnknown()
|
void |
setDescription(java.lang.String description)
|
void |
setId(long id)
|
void |
setName(java.lang.String name)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeertypeModel(long beertypeId) throws WrongNodeTypeException, org.neo4j.graphdb.NotFoundException
BeertypeModel
.
beertypeId
- The id of the desired beertype
WrongNodeTypeException
- Thrown when the given id does not reference a beertype node
org.neo4j.graphdb.NotFoundException
- Thrown when the given id does not reference an existing nodepublic BeertypeModel(org.neo4j.graphdb.Node node) throws WrongNodeTypeException, org.neo4j.graphdb.NotFoundException
BeertypeModel
.
node
- the node containing Beertype
properties.
WrongNodeTypeException
- Thrown when the given node is not of type beertype
org.neo4j.graphdb.NotFoundException
- Thrown if the node does not existMethod Detail |
---|
public boolean isUnknown()
public Beertype getDomainObject()
getDomainObject
in class AbstractModel
public org.neo4j.graphdb.Node getNode()
getNode
in class AbstractModel
public java.lang.String getDescription()
public java.lang.String getName()
public long getId()
public void setId(long id)
public void setName(java.lang.String name)
public void setDescription(java.lang.String description)
public static java.util.List<BeertypeModel> getAll() throws org.neo4j.graphdb.NotFoundException, WrongNodeTypeException
beertypeModel
.
org.neo4j.graphdb.NotFoundException
- Thrown if a node is not existant.
WrongNodeTypeException
- Thrown if a node is not of the desired typepublic static BeertypeModel create(java.lang.String name, java.lang.String description)
name
- name of the beertype.description
- detailed description of the beertype.
BeertypeModel
representing the beertype.public static BeertypeModel getUnknown() throws org.neo4j.graphdb.NotFoundException, WrongNodeTypeException
org.neo4j.graphdb.NotFoundException
- Thrown if a node is not existant
WrongNodeTypeException
- Thrown if a node is not of the desired typepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |