Package org.apache.openejb.jee.jpa

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


                    //
                    // many-to-many
                    //

                    // left
                    ManyToMany leftManyToMany = null;
                    leftManyToMany = new ManyToMany();
                    leftManyToMany.setName(leftFieldName);
                    leftManyToMany.setSyntheticField(leftSynthetic);
                    setCascade(rightRole, leftManyToMany);
                    leftEntity.getAttributes().getManyToMany().add(leftManyToMany);

                    // right
                    ManyToMany rightManyToMany = null;
                    rightManyToMany = new ManyToMany();
                    rightManyToMany.setName(rightFieldName);
                    rightManyToMany.setSyntheticField(rightSynthetic);
                    rightManyToMany.setMappedBy(leftFieldName);
                    setCascade(leftRole, rightManyToMany);
                    rightEntity.getAttributes().getManyToMany().add(rightManyToMany);

                    // link
                    leftManyToMany.setRelatedField(rightManyToMany);
                    rightManyToMany.setRelatedField(leftManyToMany);
                }
            }
        }
    }
View Full Code Here


                    //
                    // many-to-many
                    //

                    // left
                    ManyToMany leftManyToMany = null;
                    leftManyToMany = new ManyToMany();
                    leftManyToMany.setName(leftFieldName);
                    leftManyToMany.setSyntheticField(leftSynthetic);
                    setCascade(rightRole, leftManyToMany);
                    leftEntity.getAttributes().getManyToMany().add(leftManyToMany);

                    // right
                    ManyToMany rightManyToMany = null;
                    rightManyToMany = new ManyToMany();
                    rightManyToMany.setName(rightFieldName);
                    rightManyToMany.setSyntheticField(rightSynthetic);
                    rightManyToMany.setMappedBy(leftFieldName);
                    setCascade(leftRole, rightManyToMany);
                    rightEntity.getAttributes().getManyToMany().add(rightManyToMany);

                    // link
                    leftManyToMany.setRelatedField(rightManyToMany);
                    rightManyToMany.setRelatedField(leftManyToMany);
                }
            }
        }
    }
View Full Code Here

            //
            // many-to-many
            //

            // left
            final ManyToMany leftManyToMany;
            leftManyToMany = new ManyToMany();
            leftManyToMany.setName(leftFieldName);
            leftManyToMany.setSyntheticField(leftSynthetic);
            setCascade(rightRole, leftManyToMany);
            addRelationship(leftManyToMany, leftRelationships, leftAttributes.getManyToMany());

            // right
            final ManyToMany rightManyToMany;
            rightManyToMany = new ManyToMany();
            rightManyToMany.setName(rightFieldName);
            rightManyToMany.setSyntheticField(rightSynthetic);
            rightManyToMany.setMappedBy(leftFieldName);
            setCascade(leftRole, rightManyToMany);
            addRelationship(rightManyToMany, rightRelationships, rightAttributes.getManyToMany());

            // link
            leftManyToMany.setRelatedField(rightManyToMany);
            rightManyToMany.setRelatedField(leftManyToMany);
        }
    }
View Full Code Here

            //
            // many-to-many
            //

            // left
            ManyToMany leftManyToMany = null;
            leftManyToMany = new ManyToMany();
            leftManyToMany.setName(leftFieldName);
            leftManyToMany.setSyntheticField(leftSynthetic);
            setCascade(rightRole, leftManyToMany);
            addRelationship(leftManyToMany, leftRelationships, leftAttributes.getManyToMany());

            // right
            ManyToMany rightManyToMany = null;
            rightManyToMany = new ManyToMany();
            rightManyToMany.setName(rightFieldName);
            rightManyToMany.setSyntheticField(rightSynthetic);
            rightManyToMany.setMappedBy(leftFieldName);
            setCascade(leftRole, rightManyToMany);
            addRelationship(rightManyToMany, rightRelationships, rightAttributes.getManyToMany());

            // link
            leftManyToMany.setRelatedField(rightManyToMany);
            rightManyToMany.setRelatedField(leftManyToMany);
        }
    }
View Full Code Here

TOP

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

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.