@Repository
public class PropertyRepository
extends java.lang.Object
PropertyEntity
. Defines some basic
operations on database.PropertyEntity
Modifier and Type | Field | Description |
---|---|---|
private static org.apache.log4j.Logger |
logger |
|
private org.hibernate.SessionFactory |
sessionFactory |
Constructor | Description |
---|---|
PropertyRepository() |
Modifier and Type | Method | Description |
---|---|---|
void |
delete(java.lang.String propertyName) |
Delete an property for the input property name.
|
PropertyEntity |
get(java.lang.String propertyName) |
Get the property entity for the input property name.
|
java.util.List |
getAll() |
Get all properties in database.
|
void |
saveOrUpdate(PropertyEntity propertyEntity) |
Store the input
PropertyEntity instance in database. |
@Autowired private org.hibernate.SessionFactory sessionFactory
private static final org.apache.log4j.Logger logger
public void saveOrUpdate(PropertyEntity propertyEntity)
PropertyEntity
instance in database. If the
property name is already exist, update it.public void delete(java.lang.String propertyName)
propertyName
- The name of the property.public PropertyEntity get(java.lang.String propertyName)
PropertyEntity
. If the input name is null or
there is no such property in database, return null
.public java.util.List getAll()
PropertyEntity
instances.