Package com.draagon.meta

Examples of com.draagon.meta.MetaException


            throws MetaException {
        try {
            mConn.rollback();
        }
        catch (Exception e) {
            throw new MetaException("Could not rollback on JDBC Connection", e);
        }
    }
View Full Code Here


            throws MetaException {
        try {
            return mConn.isClosed();
        }
        catch (Exception e) {
            throw new MetaException("Could not determine if JDBC connection is closed", e);
        }
    }
View Full Code Here

  {
  ColumnDef colDef = (ColumnDef) mapping.getArgDef( mf );
   
    String seq = getProperName( colDef.getSequence().getNameDef() ); //getManager().getSequenceName( mf );
    if ( seq == null )
      throw new MetaException( "MetaField[" + mf + "] has no sequence defined" );

    try
    {
      // Get next next MAX() sequence
      Statement s = conn.createStatement();
      try
      {
        String query = "SELECT " + seq + ".nextval FROM dual";

        ResultSet rs = s.executeQuery( query );

        if ( !rs.next() )
          throw new MetaException( "Unable to get next id for MetaField[" + mf + "], no result in result set" );

        try
        {
          return rs.getString( 1 );
        }
        finally { rs.close(); }
      }
      finally { s.close(); }
    }
    catch( SQLException e )
    {
      log.error( "Unable to get next id for MetaField[" + mf + "]: " + e.getMessage() );
      throw new MetaException( "Unable to get next id for MetaField[" + mf + "]: " + e.getMessage(), e );
    }
  }
View Full Code Here

      MetaField mf = mc.getMetaField(order.getField());
     
      char prefix = 'A';
      ColumnDef colDef = (ColumnDef) omdb.getArgDef(mf);
      if (colDef == null) {
        throw new MetaException( "MetaField [" + mf + "] has no column mapping for [" + omdb + "]" );
      }

      if (mf.getType() == MetaField.STRING) {
        b.append("UPPER(");
        b.append( prefix ).append( "." );
View Full Code Here

    } else {
      MetaField f = mc.getMetaField(exp.getField());

      ColumnDef colDef = (ColumnDef) omdb.getArgDef(f);
      if (colDef == null) {
        throw new MetaException( "MetaField [" + f + "] has no column mapping defined for [" + omdb + "]" );
      }

      int c = exp.getCondition();

      if (c == Expression.CONTAIN || c == Expression.NOT_CONTAIN
View Full Code Here

    // Setup the WHERE clause
    for (MetaField f : keys) {
      ColumnDef colDef = (ColumnDef) omdb.getArgDef(f);
      if (colDef == null)
        throw new MetaException("MetaField [" + f
            + "] has no column mapping defined for [" + omdb + "]" );

      if (where.length() > 0)
        where.append(" AND ");
      where.append(colDef.getName());
View Full Code Here

TOP

Related Classes of com.draagon.meta.MetaException

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.