Package com.caucho.amber.field

Examples of com.caucho.amber.field.AmberField


  public SchemaExpr createField(QueryParser parser, String name)
    throws QueryParseException
  {
    EntityType type = _expr.getTargetType();

    AmberField field = type.getField(name);

    if (field == null)
      throw parser.error(L.l("{0}: '{1}' is an unknown field.",
                             type.getBeanClass().getName(),
                             name));
View Full Code Here


  public SchemaExpr createField(QueryParser parser, String name)
    throws QueryParseException
  {
    EmbeddableType type = _expr.getTargetType();

    AmberField field = type.getField(name);

    if (field == null)
      throw parser.error(L.l("{0}: '{1}' is an unknown field.",
                             type.getBeanClass().getName(),
                             name));
View Full Code Here

  /**
   * Creates the expr from the path.
   */
  public AmberExpr createField(QueryParser parser, String name)
  {
    AmberField field = getTargetType().getField(name);

    if (field == null)
      return null;
    else if (field instanceof IdField) {
      KeyPropertyField idField = _manyToOne.getIdField((IdField) field);

      return idField.createExpr(parser, _parent);
    }
    else
      return field.createExpr(parser, this);
  }
View Full Code Here

  public SchemaExpr createField(QueryParser parser, String name)
    throws QueryParseException
  {
    EntityType type = _expr.getTargetType();

    AmberField field = type.getField(name);

    if (field == null)
      throw parser.error(L.l("{0}: '{1}' is an unknown field.",
                             type.getBeanClass().getName(),
                             name));
View Full Code Here

  public SchemaExpr createField(QueryParser parser, String name)
    throws QueryParseException
  {
    BeanType type = _id.getTargetType();

    AmberField field = type.getField(name);

    if (field == null)
      throw parser.error(L.l("{0}: '{1}' is an unknown field.",
                             type.getBeanClass().getName(),
                             name));
View Full Code Here

  /**
   * Creates the expr from the path.
   */
  public AmberExpr createField(QueryParser parser, String fieldName)
  {
    AmberField field = null;

    BeanType type = getTargetType();

    do {
      field = type.getField(fieldName);

      if (type instanceof EntityType)
        type = ((EntityType) type).getParentType();
      else // XXX
        type = null;
    }
    while ((type != null) && (field == null));

    if (field == null)
      throw new AmberRuntimeException(L.l("'{0}' is an unknown field of '{1}' which has the following list of fields '{2}'",
                                          fieldName, getTargetType().getName(),
                                          getTargetType().getFields()));

    return field.createExpr(parser, this);
  }
View Full Code Here

  /**
   * Creates the expr from the path.
   */
  public AmberExpr createField(QueryParser parser, String name)
  {
    AmberField field = getTargetType().getField(name);

    if (field == null)
      return null;
    else if (field instanceof IdField) {
      KeyPropertyField idField = _manyToOne.getIdField((IdField) field);

      return idField.createExpr(parser, _parent);
    }
    else
      return field.createExpr(parser, this);
  }
View Full Code Here

  /**
   * Creates the expr from the path.
   */
  public AmberExpr createField(QueryParser parser, String fieldName)
  {
    AmberField field = null;

    BeanType type = getTargetType();

    do {
      field = type.getField(fieldName);

      if (type instanceof EntityType)
        type = ((EntityType) type).getParentType();
      else // XXX
        type = null;
    }
    while ((type != null) && (field == null));

    if (field == null)
      throw new AmberRuntimeException(L.l("'{0}' is an unknown field of '{1}' which has the following list of fields '{2}'",
                                          fieldName, getTargetType().getName(),
                                          getTargetType().getFields()));

    return field.createExpr(parser, this);
  }
View Full Code Here

  public SchemaExpr createField(QueryParser parser, String name)
    throws QueryParseException
  {
    EntityType type = _expr.getTargetType();

    AmberField field = type.getField(name);

    if (field == null)
      throw parser.error(L.l("{0}: '{1}' is an unknown field.",
                             type.getBeanClass().getName(),
                             name));
View Full Code Here

  public SchemaExpr createField(QueryParser parser, String name)
    throws QueryParseException
  {
    BeanType type = _id.getTargetType();

    AmberField field = type.getField(name);

    if (field == null)
      throw parser.error(L.l("{0}: '{1}' is an unknown field.",
                             type.getBeanClass().getName(),
                             name));
View Full Code Here

TOP

Related Classes of com.caucho.amber.field.AmberField

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.