Package org.hibernate.criterion

Examples of org.hibernate.criterion.Criterion


    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
      Criterion labelCriterrion = Expression.eq("label", label);
      Criteria criteria = tmpSession.createCriteria(SbiObjMetadata.class);
      criteria.add(labelCriterrion)
      SbiObjMetadata hibMeta = (SbiObjMetadata) criteria.uniqueResult();
      if (hibMeta == null) return null;
      toReturn = toObjMetadata(hibMeta);       
View Full Code Here


    Session aSession = null;
    Transaction tx = null;
    try {     
      aSession = getSession();
      tx = aSession.beginTransaction();
      Criterion aCriterion = Expression.eq("valueId",  aObjMetadata.getDataType());
      Criteria criteria = aSession.createCriteria(SbiDomains.class);
      criteria.add(aCriterion);

      SbiDomains dataType = (SbiDomains) criteria.uniqueResult();
View Full Code Here

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
     
      Criterion aCriterion = Expression.eq("valueId",  aObjMetadata.getDataType());
      Criteria criteria = aSession.createCriteria(SbiDomains.class);
      criteria.add(aCriterion);

      SbiDomains dataType = (SbiDomains) criteria.uniqueResult();
View Full Code Here

    UdpValue toReturn = null;
    Session tmpSession = getSession();
    Transaction tx = null;
    try {
      tx = tmpSession.beginTransaction();
      Criterion labelCriterrion = Expression.eq("referenceId", referenceId);
      Criteria criteria = tmpSession.createCriteria(SbiUdpValue.class  );
      criteria.add(labelCriterrion)
      Criterion labelCriterrion2 = Expression.eq("sbiUdp.udpId", udpId);
      criteria.add(labelCriterrion2)
      Criterion labelCriterrion3 = Expression.eq("family", family);
      criteria.add(labelCriterrion3)
      // take not closed ones!
      Criterion labelCriterrion4 = Expression.isNull("endTs");
      criteria.add(labelCriterrion4)

      SbiUdpValue hibValueUDP = (SbiUdpValue) criteria.uniqueResult();
      if (hibValueUDP == null) return null;
      toReturn = toUdpValue(hibValueUDP);       
View Full Code Here

    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
      Criterion nameCriterrion = Expression.eq("name", name);
      Criteria criteria = tmpSession.createCriteria(SbiDistributionList.class);
      criteria.add(nameCriterrion)
      SbiDistributionList hibDL = (SbiDistributionList) criteria.uniqueResult();
      if (hibDL == null) return null;
      biDL = toDistributionList(hibDL);             
View Full Code Here

    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      Criterion labelCriterrion = Expression.eq("scaleCd",cd);
      Criteria criteria = aSession.createCriteria(SbiMeasureUnit.class);
      criteria.add(labelCriterrion);
      SbiMeasureUnit hibMu = (SbiMeasureUnit) criteria.uniqueResult();
   
     
View Full Code Here

  public void modifyObjMetacontent(ObjMetacontent aObjMetacontent) throws EMFUserError {

    logger.debug("IN");
    Session aSession = null;
    Transaction tx = null;
    Criterion aCriterion = null;
    Criteria criteria = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
View Full Code Here

  public void insertObjMetacontent(ObjMetacontent aObjMetacontent) throws EMFUserError {

    logger.debug("IN");
    Session aSession = null;
    Transaction tx = null;
    Criterion aCriterion = null;
    Criteria criteria = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
View Full Code Here

       
      select = session.createCriteria(obj.getClass());
      Object auxObj;
      String nomeAtributo;
      String tipoRetorno;
      Criterion crit = Expression.sql("1 = 0"); //Adiciona um express�o falsa para n�o interferir nas clausulas where
      for (int i = 0; i < nomeCamposNaoDuplos.length; i++) {
          nomeAtributo = nomeCamposNaoDuplos[i];
        auxObj = Util.invocaGet(obj, nomeAtributo);
        tipoRetorno = auxObj.getClass().getName().toLowerCase();
        // somente adiciona um criterio se o conteudo for != vazio
View Full Code Here

       
      select = session.createCriteria(obj.getClass());
      Object auxObj;
      String nomeAtributo;
      String tipoRetorno;
      Criterion crit  = Expression.sql("1 = 1");; //Adiciona um express�o true para n�o interferir nas clausulas where
      for (int i = 0; i < nomeCamposNaoDuplos.length; i++) {
          nomeAtributo = nomeCamposNaoDuplos[i];
        auxObj = Util.invocaGet(obj, nomeAtributo);
        tipoRetorno = auxObj.getClass().getName().toLowerCase();
        // somente adiciona um criterio se o conteudo for != vazio
View Full Code Here

TOP

Related Classes of org.hibernate.criterion.Criterion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.