Package org.jboss.ejb.plugins.cmp.bridge

Examples of org.jboss.ejb.plugins.cmp.bridge.FieldBridge


   }

   private void addPath(String nav) {
      String fieldName = nav.substring(0, nav.length()-1);
      if(fieldList.size() > 0) {
         FieldBridge field = getCurrentSchema().getFieldByName(fieldName);
         if(field == null) {
            throwUnknownPath("Unknown cmr field in path", fieldName);
         }
         if(!(field instanceof CMRFieldBridge)) {
            throwUnknownPath("In path field is not a cmr field", fieldName);
View Full Code Here


            image = new StringBuffer();
            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
      String fieldName = matchedToken.image;
      matchedToken.image = path + fieldName;

      FieldBridge field = getCurrentSchema().getFieldByName(fieldName);
      if(field == null) {
         throwUnknownPath("Unknown terminal field", fieldName);
      }
      if(field instanceof CMPFieldBridge) {
         CMPFieldBridge cmpField = (CMPFieldBridge)field;
View Full Code Here

      return Arrays.asList(fields);
   }

   public FieldBridge getFieldByName(String name)
   {
      FieldBridge field = null;
      for(int i = 0; i < primaryKeyFields.length; ++i)
      {
         JDBCCMPFieldBridge primaryKeyField = primaryKeyFields[i];
         if(primaryKeyField.getFieldName().equals(name))
         {
View Full Code Here

   }

   private void addPath(String nav) {
      String fieldName = nav.substring(0, nav.length()-1);
      if(fieldList.size() > 0) {
         FieldBridge field = getCurrentSchema().getFieldByName(fieldName);
         if(field == null) {
            throwUnknownPath("Unknown cmr field in path", fieldName);
         }
         if(!(field instanceof CMRFieldBridge)) {
            throwUnknownPath("In path field is not a cmr field", fieldName);
View Full Code Here

            image = new StringBuffer();
            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
      String fieldName = matchedToken.image;
      matchedToken.image = path + fieldName;

      FieldBridge field = getCurrentSchema().getFieldByName(fieldName);
      if(field == null) {
         throwUnknownPath("Unknown terminal field", fieldName);
      }
      if(field instanceof CMPFieldBridge) {
         CMPFieldBridge cmpField = (CMPFieldBridge)field;
View Full Code Here

         // first phase is to create fk fields
         Map pkFieldsToFKFields = new HashMap(tableKeys.size());
         for(Iterator i = tableKeys.iterator(); i.hasNext();)
         {
            JDBCCMPFieldMetaData cmpFieldMetaData = (JDBCCMPFieldMetaData) i.next();
            FieldBridge pkField = entity.getFieldByName(cmpFieldMetaData.getFieldName());
            if(pkField == null)
            {
               throw new DeploymentException("Primary key not found for key-field " + cmpFieldMetaData.getFieldName());
            }
            pkFieldsToFKFields.put(pkField, new JDBCCMP2xFieldBridge(manager, cmpFieldMetaData));
View Full Code Here

      return metadata.getAbstractSchemaName();
   }

   public FieldBridge getFieldByName(String fieldName)
   {
      FieldBridge field;
      for(int i = 0; i < pkFields.length; ++i)
      {
         field = pkFields[i];
         if(field.getFieldName().equals(fieldName))
         {
            return field;
         }
      }

      for(int i = 0; i < cmpFields.length; ++i)
      {
         field = cmpFields[i];
         if(field.getFieldName().equals(fieldName))
         {
            return field;
         }
      }

      for(int i = 0; i < cmrFields.length; ++i)
      {
         field = cmrFields[i];
         if(field.getFieldName().equals(fieldName))
         {
            return field;
         }
      }
View Full Code Here

      List fields = entityBridge.getFields();
      Map map = new HashMap(fields.size() * 2);
      for(int i = 0; i < fields.size(); i++)
      {
         FieldBridge field = (FieldBridge) fields.get(i);

         // get the names
         String fieldName = field.getFieldName();
         String fieldBaseName = Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
         String getterName = "get" + fieldBaseName;
         String setterName = "set" + fieldBaseName;

         // get the accessor methods
View Full Code Here

         // first phase is to create fk fields
         Map pkFieldsToFKFields = new HashMap(tableKeys.size());
         for(Iterator i = tableKeys.iterator(); i.hasNext();)
         {
            JDBCCMPFieldMetaData cmpFieldMetaData = (JDBCCMPFieldMetaData)i.next();
            FieldBridge pkField = entity.getFieldByName(cmpFieldMetaData.getFieldName());
            if(pkField == null)
            {
               throw new DeploymentException("Primary key not found for key-field " + cmpFieldMetaData.getFieldName());
            }
            pkFieldsToFKFields.put(pkField, new JDBCCMPFieldBridge2(manager, entity, cmpFieldMetaData, -1));
View Full Code Here

      List fields = entityBridge.getFields();
      Map map = new HashMap(fields.size() * 2);
      for(int i = 0; i < fields.size(); i++)
      {
         FieldBridge field = (FieldBridge) fields.get(i);

         // get the names
         String fieldName = field.getFieldName();
         String fieldBaseName = Character.toUpperCase(fieldName.charAt(0)) +
            fieldName.substring(1);
         String getterName = "get" + fieldBaseName;
         String setterName = "set" + fieldBaseName;

View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.bridge.FieldBridge

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.