|
||||||||||
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.TagModel
public class TagModel
Model to work with and persist the tag obejct.
Constructor Summary | |
---|---|
TagModel(long id)
Creates a TagModel form a node id. |
|
TagModel(org.neo4j.graphdb.Node tagNode)
Creates a TagModel from a tag node. |
Method Summary | |
---|---|
static TagModel |
create(java.lang.String name)
Creates an new Tag. |
boolean |
equals(java.lang.Object o)
|
static java.util.List<TagModel> |
getAll()
Gets a list of all tags as TagModels . |
static TagModel |
getByName(java.lang.String name)
|
Tag |
getDomainObject()
|
long |
getId()
|
java.lang.String |
getName()
|
org.neo4j.graphdb.Node |
getNode()
|
int |
hashCode()
|
void |
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TagModel(long id) throws WrongNodeTypeException, org.neo4j.graphdb.NotFoundException
id
- The id of the desired tag
WrongNodeTypeException
- Thrown if the node with the given name is not of type tag
org.neo4j.graphdb.NotFoundException
- Thrown if the node with the given name is not existingpublic TagModel(org.neo4j.graphdb.Node tagNode) throws WrongNodeTypeException, org.neo4j.graphdb.NotFoundException
tagNode
- The tag node
WrongNodeTypeException
- Thrown if the given node is not of type tag
org.neo4j.graphdb.NotFoundException
- Thrown if the given node has not been foundMethod Detail |
---|
public long getId()
public java.lang.String getName()
public void setName(java.lang.String name)
public Tag getDomainObject()
getDomainObject
in class AbstractModel
public org.neo4j.graphdb.Node getNode()
getNode
in class AbstractModel
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public static java.util.List<TagModel> getAll() throws org.neo4j.graphdb.NotFoundException, WrongNodeTypeException
TagModels
.
org.neo4j.graphdb.NotFoundException
- Thrown if a node is not existant
WrongNodeTypeException
- Thrown if a node is not of the desired typepublic static TagModel create(java.lang.String name)
name
- Name of the new Tag
public static TagModel getByName(java.lang.String name) throws org.neo4j.graphdb.NotFoundException, WrongNodeTypeException
org.neo4j.graphdb.NotFoundException
WrongNodeTypeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |