Package org.apache.ojb.broker.query

Examples of org.apache.ojb.broker.query.QueryByCriteria


    try
    {
          Criteria filter = new Criteria();      
          filter.addEqualTo("mimetypes.name", mimeTypeName);
         
          QueryByCriteria query = QueryFactory.newQuery(getMediaTypeClass(), filter);
          mediaTypeCollection = getPersistenceBrokerTemplate().getCollectionByQuery(query);                   
    }
    catch (Exception e)
    {
          String message =
View Full Code Here


     * Obtain an iterator of all existing capabilities.
     * @return Returns an iterator for all existing Capabilities of type <code>Capability</code>
     */
    public Iterator getCapabilities()
    {
      QueryByCriteria query = null;
    try
    {
      query = QueryFactory.newQuery(getCapabilityClass(), new Criteria());
    }
    catch (Exception e)
    {
          String message =
              "CapabilityServiceImpl: getCapabilities query used invalid class ";
          log.error(message, e);
          return null;
    }
        query.addOrderByAscending("name");
        return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();       
    }
View Full Code Here

     */
    public Iterator getMimeTypes()
    {
    try
    {
      QueryByCriteria query = QueryFactory.newQuery(getMimeTypeClass(), new Criteria());
          query.addOrderByAscending("name");
          return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();               
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

     */
    public Iterator getMediaTypes()
    {
    try
    {
      QueryByCriteria query = QueryFactory.newQuery(getMediaTypeClass(), new Criteria());
          query.addOrderByAscending("name");
          return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();                       
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

    {
      try
      {
          Criteria filter = new Criteria();       
          filter.addEqualTo("name", mimeType);
          QueryByCriteria query = QueryFactory.newQuery(getMimeTypeClass(), filter);
          return (MimeType) getPersistenceBrokerTemplate().getObjectByQuery(query);
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

    {    
      try
      {
          Criteria filter = new Criteria();       
          filter.addEqualTo("name", clientName);
          QueryByCriteria query = QueryFactory.newQuery(getClientClass(), filter);
          return (Client) getPersistenceBrokerTemplate().getObjectByQuery(query);                  
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

      try
      {
     
          Criteria filter = new Criteria();       
          filter.addEqualTo("name", capability);
          QueryByCriteria query = QueryFactory.newQuery(getCapabilityClass(), filter);
          return (Capability) getPersistenceBrokerTemplate().getObjectByQuery(query);                  
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

    {
      try
      {
          Criteria filter = new Criteria();       
          filter.addEqualTo("name", mimeType);
          QueryByCriteria query = QueryFactory.newQuery(getMimeTypeClass(), filter);
          return (MimeType) getPersistenceBrokerTemplate().getObjectByQuery(query);
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

    {    
      try
      {
          Criteria filter = new Criteria();       
          filter.addEqualTo("name", clientName);
          QueryByCriteria query = QueryFactory.newQuery(getClientClass(), filter);
          return (Client) getPersistenceBrokerTemplate().getObjectByQuery(query);                  
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

      try
      {
     
          Criteria filter = new Criteria();       
          filter.addEqualTo("name", capability);
          QueryByCriteria query = QueryFactory.newQuery(getCapabilityClass(), filter);
          return (Capability) getPersistenceBrokerTemplate().getObjectByQuery(query);                  
    }
    catch (Exception e)
    {
          String message =
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.query.QueryByCriteria

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.