本文整理汇总了Java中eu.atos.sla.datamodel.bean.Service类的典型用法代码示例。如果您正苦于以下问题:Java Service类的具体用法?Java Service怎么用?Java Service使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Service类属于eu.atos.sla.datamodel.bean包,在下文中一共展示了Service类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAll
import eu.atos.sla.datamodel.bean.Service; //导入依赖的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.bean.Service; //导入依赖的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: delete
import eu.atos.sla.datamodel.bean.Service; //导入依赖的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;
}
}
示例4: delete
import eu.atos.sla.datamodel.bean.Service; //导入依赖的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: getById
import eu.atos.sla.datamodel.bean.Service; //导入依赖的package包/类
@Override
public IService getById(Long id) {
return entityManager.find(Service.class, id);
}
示例6: getById
import eu.atos.sla.datamodel.bean.Service; //导入依赖的package包/类
@Override
public IService getById(Long id) {
return entityManager.find(Service.class, id);
}