Beispiel #1
0
 public <T extends Entity> Collection<T> reverseCollectionProperty(
     String name, T referredEntity, Reference<? extends Entity> referringColumn) {
   Collection<T> property = new Collection<T>(this.getId() + "." + name, referredEntity, this);
   property.setLocalizationKey(this.getId() + "." + name);
   properties.add(property);
   PersisterFactory.getPersister().registerReverseCollection(property, referringColumn);
   return property;
 }
Beispiel #2
0
  public <T extends Entity> Collection<T> collectionProperty(
      T referredEntity, String name, String mapping, String indexName) {
    Collection<T> property = new Collection<T>(this.getId() + "." + name, referredEntity, this);
    property.setLocalizationKey(this.getId() + "." + name);
    properties.add(property);

    PersisterFactory.getPersister()
        .registerReference(referredEntity, property, mapping, this, indexName);

    return property;
  }