当前位置: 首页>>代码示例>>Java>>正文


Java IService类代码示例

本文整理汇总了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;
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:17,代码来源:ServiceDAOJpa.java

示例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;
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:17,代码来源:ServiceDAOJpa.java

示例3: save

import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService save(IService service){
	
		entityManager.persist(service);
		entityManager.flush();
	
	return service;
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:9,代码来源:ServiceDAOJpa.java

示例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;
	}
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:14,代码来源:ServiceDAOJpa.java

示例5: save

import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService save(IService service){
    
        entityManager.persist(service);
        entityManager.flush();
    
    return service;
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:9,代码来源:ServiceDAOJpa.java

示例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;
    }
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:14,代码来源:ServiceDAOJpa.java

示例7: getById

import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService getById(Long id) {
	return entityManager.find(Service.class, id);
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:5,代码来源:ServiceDAOJpa.java

示例8: update

import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public boolean update(IService service) {
	entityManager.merge(service);
	entityManager.flush();
	return true;
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:7,代码来源:ServiceDAOJpa.java

示例9: getById

import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public IService getById(Long id) {
    return entityManager.find(Service.class, id);
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:5,代码来源:ServiceDAOJpa.java

示例10: update

import eu.atos.sla.datamodel.IService; //导入依赖的package包/类
@Override
public boolean update(IService service) {
    entityManager.merge(service);
    entityManager.flush();
    return true;
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:7,代码来源:ServiceDAOJpa.java

示例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);
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:10,代码来源:IServiceDAO.java

示例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);
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:9,代码来源:IServiceDAO.java

示例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);
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:9,代码来源:IServiceDAO.java

示例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);
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:9,代码来源:IServiceDAO.java

示例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();
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:7,代码来源:IServiceDAO.java


注:本文中的eu.atos.sla.datamodel.IService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。