Core classes
In the package com.erudika.para.core there are a number of core domain classes that are used throughout Para.
These are common classes like User and App which you can use in you application directly or extend them.
You can use them for your objects but you’re always free to create your own. To do that, simply POST a new object
with type: mytype through the API and your new type will be automatically registered.
| class | description |
|---|---|
User | Defines a basic user with a name, email, password. Used for user registration and security. |
Address | Defines an address with optional geographical coordinates. Used for location based searching. |
App | Defines an application within Para. Usually there’s only one existing (root) app. |
Tag | Simple tag class which contains a tag and its frequency count. Basically any Para object can be tagged. Used for searching. |
Vote | Defines a user vote - negative or positive. Useful for modeling objects which can be voted on (likes, +1s, favs, etc). |
Translation | Holds a translated string. Can be used for collecting translations from users. |
Sysprop | System class used as a general-purpose data container. It’s basically a map. |
Linker | System class used for implementing a many-to-many relationship between objects. |
Webhook | System class used for storing webhook metadata. |
Form | Used for HTML form handling and storing the configuration for each form. |
Voting
Section titled “Voting”Para implements a simple voting mechanism for objects - each object can be voted up and down an has a votes property.
Voting is useful for many application which require sorting by user votes. When a vote is cast, a new object of type
Vote is created to store the vote in the database. Users have a configurable time window to amend their vote, they can
no longer vote on that particular object.