コード例 #1
0
  /**
   * Constructs a {@link CompositeElementGraph}.
   *
   * @param sessionFactory - the session factory.
   * @param collectionReference - the collection reference.
   * @param collectionPath - the {@link PropertyPath} for the collection.
   */
  public CompositeElementGraph(
      SessionFactoryImplementor sessionFactory,
      CollectionReference collectionReference,
      PropertyPath collectionPath) {
    super(sessionFactory);

    this.collectionReference = collectionReference;
    this.collectionPersister = collectionReference.getCollectionPersister();
    this.propertyPath = collectionPath.append("<elements>");
    this.fetchOwnerDelegate =
        new CompositeFetchOwnerDelegate(
            sessionFactory,
            (CompositeType) collectionPersister.getElementType(),
            ((QueryableCollection) collectionPersister).getElementColumnNames());
  }