當前位置: 首頁>>代碼示例>>Java>>正文


Java Variable類代碼示例

本文整理匯總了Java中eu.atos.sla.datamodel.bean.Variable的典型用法代碼示例。如果您正苦於以下問題:Java Variable類的具體用法?Java Variable怎麽用?Java Variable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Variable類屬於eu.atos.sla.datamodel.bean包,在下文中一共展示了Variable類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getByName

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public IVariable getByName(String name) {
	try {
		TypedQuery<IVariable> query = entityManager.createNamedQuery(
				Variable.QUERY_FIND_BY_NAME, IVariable.class);
		query.setParameter("name", name);
		IVariable variable = new Variable();

		variable = query.getSingleResult();
		

		return variable;

	} catch (NoResultException e) {
		logger.debug("No Result found: " + e);
		return null;
	}
}
 
開發者ID:Atos-FiwareOps,項目名稱:sla-framework,代碼行數:19,代碼來源:VariableDAOJpa.java

示例2: getAll

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public List<IVariable> getAll() {

	TypedQuery<IVariable> query = entityManager.createNamedQuery(
			Variable.QUERY_FIND_ALL, IVariable.class);
	List<IVariable> services = new ArrayList<IVariable>();
	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,代碼來源:VariableDAOJpa.java

示例3: getByName

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public IVariable getByName(String name) {
    try {
        TypedQuery<IVariable> query = entityManager.createNamedQuery(
                Variable.QUERY_FIND_BY_NAME, IVariable.class);
        query.setParameter("name", name);
        IVariable variable = new Variable();

        variable = query.getSingleResult();
        

        return variable;

    } catch (NoResultException e) {
        logger.debug("No Result found: " + e);
        return null;
    }
}
 
開發者ID:SeaCloudsEU,項目名稱:SeaCloudsPlatform,代碼行數:19,代碼來源:VariableDAOJpa.java

示例4: getAll

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public List<IVariable> getAll() {

    TypedQuery<IVariable> query = entityManager.createNamedQuery(
            Variable.QUERY_FIND_ALL, IVariable.class);
    List<IVariable> services = new ArrayList<IVariable>();
    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,代碼來源:VariableDAOJpa.java

示例5: delete

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public boolean delete(IVariable variable) {
	try {
		variable = entityManager
				.getReference(Variable.class, variable.getId());
		entityManager.remove(variable);
		entityManager.flush();
		return true;
	} catch (EntityNotFoundException e) {
		logger.debug("Variable[{}] not found", variable.getId());
		return false;
	}
}
 
開發者ID:Atos-FiwareOps,項目名稱:sla-framework,代碼行數:14,代碼來源:VariableDAOJpa.java

示例6: delete

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public boolean delete(IVariable variable) {
    try {
        variable = entityManager
                .getReference(Variable.class, variable.getId());
        entityManager.remove(variable);
        entityManager.flush();
        return true;
    } catch (EntityNotFoundException e) {
        logger.debug("Variable[{}] not found", variable.getId());
        return false;
    }
}
 
開發者ID:SeaCloudsEU,項目名稱:SeaCloudsPlatform,代碼行數:14,代碼來源:VariableDAOJpa.java

示例7: getById

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public Variable getById(Long id) {
	return entityManager.find(Variable.class, id);
}
 
開發者ID:Atos-FiwareOps,項目名稱:sla-framework,代碼行數:5,代碼來源:VariableDAOJpa.java

示例8: getById

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
@Override
public Variable getById(Long id) {
    return entityManager.find(Variable.class, id);
}
 
開發者ID:SeaCloudsEU,項目名稱:SeaCloudsPlatform,代碼行數:5,代碼來源:VariableDAOJpa.java

示例9: getById

import eu.atos.sla.datamodel.bean.Variable; //導入依賴的package包/類
/**
 * Returns the variable from the database by its Id
 * 
 * @param id
 *            of the variable
 * @return the corresponding variable from the database
 */
public Variable getById(Long id);
 
開發者ID:Atos-FiwareOps,項目名稱:sla-framework,代碼行數:9,代碼來源:IVariableDAO.java


注:本文中的eu.atos.sla.datamodel.bean.Variable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。