Examples of AmberType


Examples of com.caucho.amber.type.AmberType

          else if (expr instanceof PathExpr) {
            PathExpr pathExpr = (PathExpr) expr;

            FromItem rootItem = null;

            AmberType targetType = pathExpr.getTargetType();

            // jpa/0w24
            if (targetType instanceof EntityType) {
              EntityType relatedType = (EntityType) targetType;
              EntityType parentType = relatedType;
View Full Code Here

Examples of com.caucho.amber.type.AmberType

   * Executes the query, filling the list.
   */
  public void list(List<Object> list, AmberConnection aConn, long maxAge)
    throws SQLException
  {
    AmberType type = _query.getResultType(0);
    EntityType entityType = (EntityType) type;
    Class cl = entityType.getBeanClass();
   
    synchronized (this) {
      long now = Alarm.getCurrentTime();
View Full Code Here

Examples of com.caucho.amber.type.AmberType

  private static void bindTypes(AmberExpr left,
                                AmberExpr right)
  {
    // jpa/141d

    AmberType leftType = left.getType();
    AmberType rightType = right.getType();

    if (left instanceof EnumExpr) {
      EnumExpr enumExpr = (EnumExpr) left;
      enumExpr.setOrdinal(rightType.isNumeric());
    }
    else if (left instanceof ArgExpr) {
      if (rightType instanceof EnumType) {
        ((ArgExpr) left).setType(rightType);
      }
View Full Code Here

Examples of com.caucho.amber.type.AmberType

  {
    PropertyField property = new PropertyField(_sourceType, _fieldName);
    AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit();
   
    AmberType amberType;

    if (_enumerated == null)
      amberType = persistenceUnit.createType(_fieldType);
    else {
      com.caucho.amber.type.EnumType enumType;
View Full Code Here

Examples of com.caucho.amber.type.AmberType

        }

        if (prop != null)
          key = prop;

        AmberType columnType = key.getColumn().getType();

        value = columnType.generateCastFromObject("field" + i);

        key.generateSet(out, objThis, value);
      }

      // jpa/0u21
View Full Code Here

Examples of com.caucho.amber.type.AmberType

   * Generates the is null test.
   */
  public String generateIsNull()
  {
    String getter = generateSuperGetter("this");
    AmberType type = getColumn().getType();

    return type.generateIsNull(getter);
  }
View Full Code Here

Examples of com.caucho.amber.type.AmberType

    String dirtyVar = "__caucho_dirtyMask_" + dirtyGroup;

    long dirtyMask = 1L << (getIndex() % 64);

    String getter = generateSuperGetter("this");
    AmberType type = getColumn().getType();

    // jpa/0x02
    out.println();
    out.println("if (" + generateIsNull() + ")");

    if (type.getJavaTypeName().equals(Timestamp.class.getName()))
      out.println("  " + generateSuperSetter("this", "new java.sql.Timestamp(com.caucho.util.Alarm.getExactTime())") + ";");
    else
      out.println("  " + generateSuperSetter("this", "new Integer(1)") + ";");
     
    out.println("else");
    out.println("  " + generateSuperSetter("this", type.generateIncrementVersion(getter)) + ";");

    out.println();
    out.println("long oldMask = " + dirtyVar + ";");
    out.println(dirtyVar + " |= " + dirtyMask + "L;");
    out.println();
View Full Code Here

Examples of com.caucho.amber.type.AmberType

                                 String pstmt,
                                 String index)
    throws IOException
  {
    String value = generateGet("super");
    AmberType type = getColumn().getType();
    // jpa/0x02
    getColumn().generateSetVersion(out, pstmt, index, value); // type.generateIncrementVersion(value));
  }
View Full Code Here

Examples of com.caucho.amber.type.AmberType

   * Executes the query, filling the list.
   */
  public void list(List<Object> list, AmberConnection aConn, long maxAge)
    throws SQLException
  {
    AmberType type = _query.getResultType(0);
    EntityType entityType = (EntityType) type;
    Class cl = entityType.getBeanClass();
   
    synchronized (this) {
      long now = Alarm.getCurrentTime();
View Full Code Here

Examples of com.caucho.amber.type.AmberType

          else if (expr instanceof PathExpr) {
            PathExpr pathExpr = (PathExpr) expr;

            FromItem rootItem = null;

            AmberType targetType = pathExpr.getTargetType();

            // jpa/0w24
            if (targetType instanceof EntityType) {
              EntityType relatedType = (EntityType) targetType;
              EntityType parentType = relatedType;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.