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

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


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


/*      */       else
/* 1922 */         this.image.append(this.input_stream.GetSuffix(this.jjimageLen + (this.lengthOfMatch = this.jjmatchedPos + 1)));
/* 1923 */       String fieldName = matchedToken.image;
/* 1924 */       matchedToken.image = (this.path + fieldName);
/*      */
/* 1926 */       FieldBridge field = getCurrentSchema().getFieldByName(fieldName);
/* 1927 */       if (field == null) {
/* 1928 */         throwUnknownPath("Unknown terminal field", fieldName);
/*      */       }
/* 1930 */       if ((field instanceof CMPFieldBridge)) {
/* 1931 */         CMPFieldBridge cmpField = (CMPFieldBridge)field;
View Full Code Here

/*     */
/* 113 */     List fields = this.entityBridge.getFields();
/* 114 */     Map map = new HashMap(fields.size() * 2);
/* 115 */     for (int i = 0; i < fields.size(); i++)
/*     */     {
/* 117 */       FieldBridge field = (FieldBridge)fields.get(i);
/*     */
/* 120 */       String fieldName = field.getFieldName();
/* 121 */       String fieldBaseName = Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
/*     */
/* 123 */       String getterName = "get" + fieldBaseName;
/* 124 */       String setterName = "set" + fieldBaseName;
/*     */
View Full Code Here

/*     */
/*     */   public FieldBridge getFieldByName(String fieldName)
/*     */   {
/* 363 */     for (int i = 0; i < this.pkFields.length; i++)
/*     */     {
/* 365 */       FieldBridge field = this.pkFields[i];
/* 366 */       if (field.getFieldName().equals(fieldName))
/*     */       {
/* 368 */         return field;
/*     */       }
/*     */     }
/*     */
/* 372 */     for (int i = 0; i < this.cmpFields.length; i++)
/*     */     {
/* 374 */       FieldBridge field = this.cmpFields[i];
/* 375 */       if (field.getFieldName().equals(fieldName))
/*     */       {
/* 377 */         return field;
/*     */       }
/*     */     }
/*     */
/* 381 */     for (int i = 0; i < this.cmrFields.length; i++)
/*     */     {
/* 383 */       FieldBridge field = this.cmrFields[i];
/* 384 */       if (field.getFieldName().equals(fieldName))
/*     */       {
/* 386 */         return field;
/*     */       }
/*     */     }
/*     */
View Full Code Here

/*      */
/*  335 */       Map pkFieldsToFKFields = new HashMap(tableKeys.size());
/*  336 */       for (Iterator i = tableKeys.iterator(); i.hasNext(); )
/*      */       {
/*  338 */         JDBCCMPFieldMetaData cmpFieldMetaData = (JDBCCMPFieldMetaData)i.next();
/*  339 */         FieldBridge pkField = this.entity.getFieldByName(cmpFieldMetaData.getFieldName());
/*  340 */         if (pkField == null)
/*      */         {
/*  342 */           throw new DeploymentException("Primary key not found for key-field " + cmpFieldMetaData.getFieldName());
/*      */         }
/*  344 */         pkFieldsToFKFields.put(pkField, new JDBCCMP2xFieldBridge(this.manager, cmpFieldMetaData));
View Full Code Here

/*      */
/*  209 */       Map pkFieldsToFKFields = new HashMap(tableKeys.size());
/*  210 */       for (Iterator i = tableKeys.iterator(); i.hasNext(); )
/*      */       {
/*  212 */         JDBCCMPFieldMetaData cmpFieldMetaData = (JDBCCMPFieldMetaData)i.next();
/*  213 */         FieldBridge pkField = this.entity.getFieldByName(cmpFieldMetaData.getFieldName());
/*  214 */         if (pkField == null)
/*      */         {
/*  216 */           throw new DeploymentException("Primary key not found for key-field " + cmpFieldMetaData.getFieldName());
/*      */         }
/*  218 */         pkFieldsToFKFields.put(pkField, new JDBCCMPFieldBridge2(this.manager, this.entity, cmpFieldMetaData, -1));
View Full Code Here

/*  441 */     return Arrays.asList(fields);
/*      */   }
/*      */
/*      */   public FieldBridge getFieldByName(String name)
/*      */   {
/*  446 */     FieldBridge field = null;
/*  447 */     for (int i = 0; i < this.primaryKeyFields.length; i++)
/*      */     {
/*  449 */       JDBCCMPFieldBridge primaryKeyField = this.primaryKeyFields[i];
/*  450 */       if (!primaryKeyField.getFieldName().equals(name))
/*      */         continue;
View Full Code Here

/*     */
/* 113 */     List fields = entityBridge.getFields();
/* 114 */     Map map = new HashMap(fields.size() * 2);
/* 115 */     for (int i = 0; i < fields.size(); i++)
/*     */     {
/* 117 */       FieldBridge field = (FieldBridge)fields.get(i);
/*     */
/* 120 */       String fieldName = field.getFieldName();
/* 121 */       String fieldBaseName = Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
/* 122 */       String getterName = "get" + fieldBaseName;
/* 123 */       String setterName = "set" + fieldBaseName;
/*     */
/* 126 */       Method getterMethod = (Method)abstractAccessors.get(getterName);
View Full Code Here

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

/*      */       else
/* 1866 */         this.image.append(this.input_stream.GetSuffix(this.jjimageLen + (this.lengthOfMatch = this.jjmatchedPos + 1)));
/* 1867 */       String fieldName = matchedToken.image;
/* 1868 */       matchedToken.image = (this.path + fieldName);
/*      */
/* 1870 */       FieldBridge field = getCurrentSchema().getFieldByName(fieldName);
/* 1871 */       if (field == null) {
/* 1872 */         throwUnknownPath("Unknown terminal field", fieldName);
/*      */       }
/* 1874 */       if ((field instanceof CMPFieldBridge)) {
/* 1875 */         CMPFieldBridge cmpField = (CMPFieldBridge)field;
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.