public class Sysprop extends Object implements ParaObject
Votable.VoteValue| Constructor and Description |
|---|
Sysprop()
No-args constructor
|
Sysprop(String id)
The default constructor
|
| Modifier and Type | Method and Description |
|---|---|
Sysprop |
addProperty(String name,
Object value)
Adds a new key/value pair to the map.
|
Long |
countChildren(String type)
Count the total number of child objects for this object.
|
Long |
countLinks(String type2)
Count the total number of links between this object and another type of object.
|
String |
create()
Stores this object in the data store.
|
void |
delete()
Deletes the object permanently by removing it from the data store.
|
void |
deleteChildren(String type)
Deletes all child objects permanently.
|
boolean |
equals(Object obj) |
boolean |
exists()
Checks if an object is stored in the data store.
|
String |
getAppid()
The application name.
|
Boolean |
getCached()
Boolean flat which controls whether this object is cached.
|
<P extends ParaObject> |
getChildren(String type,
Pager... pager)
Returns all child objects linked to this object.
|
<P extends ParaObject> |
getChildren(String type,
String field,
String term,
Pager... pager)
Returns all child objects linked to this object.
|
String |
getCreatorid()
The id of the user who created this.
|
String |
getId()
The id of an object.
|
Boolean |
getIndexed()
Boolean flat which controls whether this object is indexed
by the search engine.
|
<P extends ParaObject> |
getLinkedObjects(String type,
Pager... pager)
Similar to
Linkable.getChildren(java.lang.String, com.erudika.para.utils.Pager...)
but for many-to-many relationships. |
List<Linker> |
getLinks(String type2,
Pager... pager)
Returns all links between this type object and another type of object.
|
String |
getName()
The name of the object.
|
String |
getObjectURI()
The URI of this object.
|
String |
getParentid()
The id of the parent object.
|
String |
getPlural()
The plural name of the object.
|
Map<String,Object> |
getProperties()
A map of all properties (key/values)
|
Object |
getProperty(String name)
Returns the value of a property for a given key
|
Boolean |
getStored()
Boolean flag which controls whether this object is stored
in the database or not.
|
List<String> |
getTags()
The tags associated with this object.
|
Long |
getTimestamp()
The time when the object was created, in milliseconds.
|
String |
getType()
The name of the object's class.
|
Long |
getUpdated()
The last time this object was updated.
|
Integer |
getVotes()
Returns the total sum of all votes for this object.
|
int |
hashCode() |
boolean |
hasProperty(String name)
Checks for the existence of a property
|
boolean |
isLinked(ParaObject toObj)
Checks if a given object is linked to this one.
|
boolean |
isLinked(String type2,
String id2)
Checks if this object is linked to another.
|
String |
link(String id2)
Links an object to this one in a many-to-many relationship.
|
Sysprop |
removeProperty(String name)
Removes a property from the map
|
void |
setAppid(String appid)
Sets a new app name.
|
void |
setCached(Boolean cached)
Sets the "isCached" flag.
|
void |
setCreatorid(String creatorid)
Sets a new creator id.
|
void |
setId(String id)
Sets a new id.
|
void |
setIndexed(Boolean indexed)
Sets the "isIndexed" flag.
|
void |
setName(String name)
Sets a new name.
|
void |
setParentid(String parentid)
Sets a new parent id.
|
void |
setProperties(Map<String,Object> properties)
Overwrites the map.
|
void |
setStored(Boolean stored)
Sets the "isStored" flag.
|
void |
setTags(List<String> tags)
Merges the given tags with existing tags.
|
void |
setTimestamp(Long timestamp)
Sets the timestamp.
|
void |
setType(String type)
Sets a new object type.
|
void |
setUpdated(Long updated)
Sets the last updated timestamp.
|
void |
setVotes(Integer votes)
Sets the total votes for this object.
|
String |
toString() |
void |
unlink(String type,
String id2)
Unlinks an object from this one.
|
void |
unlinkAll()
Unlinks all objects that are linked to this one.
|
void |
update()
Updates the object permanently.
|
boolean |
voteDown(String userid)
Downvotes the object.
|
boolean |
voteUp(String userid)
Upvotes the object.
|
public Sysprop()
public Sysprop(String id)
id - the object idpublic Sysprop addProperty(String name, Object value)
name - a keyvalue - a valuepublic Object getProperty(String name)
name - the keypublic Sysprop removeProperty(String name)
name - the keypublic boolean hasProperty(String name)
name - the keypublic Map<String,Object> getProperties()
public void setProperties(Map<String,Object> properties)
properties - a new mappublic final String getId()
ParaObjectgetId in interface ParaObjectpublic final void setId(String id)
ParaObjectsetId in interface ParaObjectid - the new idpublic final String getType()
ParaObjectClass.getSimpleName().toLowerCase()getType in interface ParaObjectpublic final void setType(String type)
ParaObjectsetType in interface ParaObjecttype - a new typepublic String getAppid()
ParaObjectgetAppid in interface ParaObjectpublic void setAppid(String appid)
ParaObjectsetAppid in interface ParaObjectappid - the new app id (name)public String getObjectURI()
ParaObjectgetObjectURI in interface ParaObjectUtils.getObjectURI(com.erudika.para.core.ParaObject, boolean, boolean)public List<String> getTags()
ParaObjectgetTags in interface ParaObjectTagpublic void setTags(List<String> tags)
ParaObjectsetTags in interface ParaObjecttags - the additional tags, or clears all tags if set to nullpublic Boolean getStored()
ParaObjectgetStored in interface ParaObjectpublic void setStored(Boolean stored)
ParaObjectsetStored in interface ParaObjectstored - when set to true, object is stored in DB.public Boolean getIndexed()
ParaObjectgetIndexed in interface ParaObjectpublic void setIndexed(Boolean indexed)
ParaObjectsetIndexed in interface ParaObjectindexed - when set to true, object is indexed.public Boolean getCached()
ParaObjectgetCached in interface ParaObjectpublic void setCached(Boolean cached)
ParaObjectsetCached in interface ParaObjectcached - when set to true, object is cached.public Long getTimestamp()
ParaObjectgetTimestamp in interface ParaObjectpublic void setTimestamp(Long timestamp)
ParaObjectsetTimestamp in interface ParaObjecttimestamp - a new timestamp in milliseconds.public String getCreatorid()
ParaObjectUser id.getCreatorid in interface ParaObjectpublic void setCreatorid(String creatorid)
ParaObjectsetCreatorid in interface ParaObjectcreatorid - a new idpublic final String getName()
ParaObjectgetName in interface ParaObjectpublic final void setName(String name)
ParaObjectsetName in interface ParaObjectname - the new namepublic String getPlural()
ParaObjectgetPlural in interface ParaObjectpublic String getParentid()
ParaObjectgetParentid in interface ParaObjectpublic void setParentid(String parentid)
ParaObjectsetParentid in interface ParaObjectparentid - a new idpublic Long getUpdated()
ParaObjectgetUpdated in interface ParaObjectpublic void setUpdated(Long updated)
ParaObjectsetUpdated in interface ParaObjectupdated - a new timestamppublic String create()
ParaObjectcreate in interface ParaObjectStored,
DAO.create(com.erudika.para.core.ParaObject)public void update()
ParaObjectLocked fields are ignored.update in interface ParaObjectLocked,
DAO.update(com.erudika.para.core.ParaObject)public void delete()
ParaObjectdelete in interface ParaObjectDAO.delete(com.erudika.para.core.ParaObject)public boolean exists()
ParaObjectexists in interface ParaObjectDAO.read(java.lang.String)public boolean voteUp(String userid)
Votablepublic boolean voteDown(String userid)
Votablepublic Integer getVotes()
Votablepublic void setVotes(Integer votes)
Votablepublic Long countLinks(String type2)
LinkablecountLinks in interface Linkabletype2 - the other type of objectpublic List<Linker> getLinks(String type2, Pager... pager)
Linkablepublic <P extends ParaObject> List<P> getLinkedObjects(String type, Pager... pager)
LinkableLinkable.getChildren(java.lang.String, com.erudika.para.utils.Pager...)
but for many-to-many relationships.getLinkedObjects in interface LinkableP - type of linked objectstype - type of linked objectspager - a Pagerpublic boolean isLinked(String type2, String id2)
Linkablepublic boolean isLinked(ParaObject toObj)
Linkablepublic String link(String id2)
Linkablepublic void unlink(String type, String id2)
Linkablepublic void unlinkAll()
LinkableLinker objects. Only the links are deleted. Objects are left untouched.public Long countChildren(String type)
LinkablecountChildren in interface Linkabletype - the other type of objectpublic <P extends ParaObject> List<P> getChildren(String type, Pager... pager)
LinkablegetChildren in interface LinkableP - the type of childrentype - the type of children to look forpager - a PagerParaObject in a one-to-many relationship with this objectpublic <P extends ParaObject> List<P> getChildren(String type, String field, String term, Pager... pager)
LinkablegetChildren in interface LinkableP - the type of childrentype - the type of children to look forfield - the field name to use as filterterm - the field value to use as filterpager - a PagerParaObject in a one-to-many relationship with this objectpublic void deleteChildren(String type)
LinkabledeleteChildren in interface Linkabletype - the children's type.Copyright © 2016 Erudika. All rights reserved.