本文整理汇总了Java中eu.atos.sla.datamodel.IService类的典型用法代码示例。如果您正苦于以下问题:Java IService类的具体用法?Java IService怎么用?Java IService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IService类属于eu.atos.sla.datamodel包,在下文中一共展示了IService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAll
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public List<IService> getAll() {
TypedQuery<IService> query = entityManager.createNamedQuery(
Service.QUERY_FIND_ALL, IService.class);
List<IService> services = new ArrayList<IService>();
services = query.getResultList();
if (services != null) {
logger.debug("Number of services:" + services.size());
} else {
logger.debug("No Result found.");
}
return services;
}
示例2: getAll
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public List<IService> getAll() {
TypedQuery<IService> query = entityManager.createNamedQuery(
Service.QUERY_FIND_ALL, IService.class);
List<IService> services = new ArrayList<IService>();
services = query.getResultList();
if (services != null) {
logger.debug("Number of services:" + services.size());
} else {
logger.debug("No Result found.");
}
return services;
}
示例3: save
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService save(IService service){
entityManager.persist(service);
entityManager.flush();
return service;
}
示例4: delete
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public boolean delete(IService service) {
try {
service = entityManager
.getReference(Service.class, service.getId());
entityManager.remove(service);
entityManager.flush();
return true;
} catch (EntityNotFoundException e) {
logger.debug("Service[{}] not found", service.getId());
return false;
}
}
示例5: save
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService save(IService service){
entityManager.persist(service);
entityManager.flush();
return service;
}
示例6: delete
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public boolean delete(IService service) {
try {
service = entityManager
.getReference(Service.class, service.getId());
entityManager.remove(service);
entityManager.flush();
return true;
} catch (EntityNotFoundException e) {
logger.debug("Service[{}] not found", service.getId());
return false;
}
}
示例7: getById
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService getById(Long id) {
return entityManager.find(Service.class, id);
}
示例8: update
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public boolean update(IService service) {
entityManager.merge(service);
entityManager.flush();
return true;
}
示例9: getById
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService getById(Long id) {
return entityManager.find(Service.class, id);
}
示例10: update
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public boolean update(IService service) {
entityManager.merge(service);
entityManager.flush();
return true;
}
示例11: save
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
/**
* Stores a Service into the database
*
* @param Service
* - Service to be saved.
* @return <code>true</code> if the ServiceType was saved correctly
* @throws Exception
*/
public IService save(IService service);
示例12: getById
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
/**
* Returns the Service from the database by its Id
*
* @param id
* of the Service
* @return the corresponding Service from the database
*/
public IService getById(Long id);
示例13: getByUUID
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
/**
* Returns the Service from the database by its UUID
*
* @param id
* of the Service
* @return the corresponding Service from the database
*/
public IService getByUUID(String uuid);
示例14: getByName
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
/**
* Returns the Service from the database by its name
*
* @param id
* of the Service
* @return the corresponding Service from the database
*/
public IService getByName(String serviceName);
示例15: getAll
import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
/**
* Returns all the Service stored in the database
*
* @return all the Service stored in the database
*/
public List<IService> getAll();