Package org.apache.openejb.jee.jpa

Examples of org.apache.openejb.jee.jpa.TableGenerator


        sequenceGeneratorProps.put("initialValue", sequenceGenerator.getInitialValue().intValue()); //$NON-NLS-1$
        sequenceGeneratorProps.put("allocationSize", sequenceGenerator.getAllocationSize().intValue()); //$NON-NLS-1$

        facade.addMethodAnnotation(entityBean.getEjbClass(), methodName, emptySignature, javax.persistence.SequenceGenerator.class, sequenceGeneratorProps);
      }
      TableGenerator tableGenerator = id.getTableGenerator();
      if (tableGenerator != null) {
        Map<String, Object> tableGeneratorProps = new HashMap<String, Object>();
        tableGeneratorProps.put("name", tableGenerator.getName()); //$NON-NLS-1$
        tableGeneratorProps.put("table", tableGenerator.getTable()); //$NON-NLS-1$
        tableGeneratorProps.put("catalog", tableGenerator.getCatalog()); //$NON-NLS-1$
        tableGeneratorProps.put("schema", tableGenerator.getSchema()); //$NON-NLS-1$
        tableGeneratorProps.put("pkColumnName", tableGenerator.getPkColumnName()); //$NON-NLS-1$
        tableGeneratorProps.put("valueColumnName", tableGenerator.getValueColumnName()); //$NON-NLS-1$
        tableGeneratorProps.put("pkColumnValue", tableGenerator.getPkColumnValue()); //$NON-NLS-1$
        tableGeneratorProps.put("initialValue", tableGenerator.getInitialValue().intValue()); //$NON-NLS-1$
        tableGeneratorProps.put("allocationSize", tableGenerator.getAllocationSize().intValue()); //$NON-NLS-1$

        List uniqueConstraintPropsList = new ArrayList();

        List<UniqueConstraint> uniqueConstraints = tableGenerator.getUniqueConstraint();
        for (UniqueConstraint uniqueConstriant : uniqueConstraints) {
          Map<String, Object> uniqueConstraintProps = new HashMap<String, Object>();
          List<String> columns = uniqueConstriant.getColumnName();
          uniqueConstraintProps.put("columnNames", columns.toArray(new String[0])); //$NON-NLS-1$
          uniqueConstraintPropsList.add(uniqueConstraintProps);
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.jpa.TableGenerator

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.