@Repository
public class BorderRouterRepository
extends java.lang.Object
BorderRouterEntity
. Defines basic database
operation methods for border router entity.BorderRouterEntity
Modifier and Type | Field | Description |
---|---|---|
private static org.apache.log4j.Logger |
logger |
|
private org.hibernate.SessionFactory |
sessionFactory |
Constructor | Description |
---|---|
BorderRouterRepository() |
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Delete all entries in borderRouter table.
|
BorderRouterEntity |
get(java.lang.String borderRouterIp) |
Get a
BorderRouterEntity instance for the input border router IP. |
java.util.List<BorderRouterEntity> |
getAll() |
Fetch all border router from database, ordered by border router name.
|
java.lang.String |
save(BorderRouterEntity borderRouterEntity) |
Save the input border router in database;
Throws
NullPointerException if the input borderRouterEntity is null; |
long |
size() |
Get the number of borderRouter entries in database.
|
@Autowired private org.hibernate.SessionFactory sessionFactory
private static final org.apache.log4j.Logger logger
public java.lang.String save(BorderRouterEntity borderRouterEntity)
NullPointerException
if the input borderRouterEntity is null;borderRouterEntity
- The model of border router you want to save.public java.util.List<BorderRouterEntity> getAll()
BorderRouterEntity
.public long size()
public void clear()
public BorderRouterEntity get(java.lang.String borderRouterIp)
BorderRouterEntity
instance for the input border router IP.
Return null
if the input border router IP doesn't exist in database.borderRouterIp
- The IPv6 address of the border router you want to get.BorderRouterEntity