Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-6502: Added support for lists to new metamodel up to Binder proce…
…ssing. Still need to modify persisters.
- Loading branch information
Showing
14 changed files
with
640 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...re/src/main/java/org/hibernate/metamodel/internal/source/hbm/ListAttributeSourceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as | ||
* indicated by the @author tags or express copyright attribution | ||
* statements applied by the authors. All third-party contributions are | ||
* distributed under license by Red Hat Inc. | ||
* | ||
* This copyrighted material is made available to anyone wishing to use, modify, | ||
* copy, or redistribute it subject to the terms and conditions of the GNU | ||
* Lesser General Public License, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this distribution; if not, write to: | ||
* Free Software Foundation, Inc. | ||
* 51 Franklin Street, Fifth Floor | ||
* Boston, MA 02110-1301 USA | ||
*/ | ||
package org.hibernate.metamodel.internal.source.hbm; | ||
|
||
import org.hibernate.internal.jaxb.mapping.hbm.JaxbListElement; | ||
import org.hibernate.metamodel.spi.source.AttributeSourceContainer; | ||
import org.hibernate.metamodel.spi.source.PluralAttributeIndexSource; | ||
import org.hibernate.metamodel.spi.source.PluralAttributeNature; | ||
|
||
/** | ||
* | ||
*/ | ||
public class ListAttributeSourceImpl extends AbstractPluralAttributeSourceImpl { | ||
|
||
private final PluralAttributeIndexSource indexSource; | ||
|
||
/** | ||
* @param sourceMappingDocument | ||
* @param listElement | ||
* @param container | ||
*/ | ||
public ListAttributeSourceImpl( | ||
MappingDocument sourceMappingDocument, | ||
JaxbListElement listElement, | ||
AttributeSourceContainer container ) { | ||
super( sourceMappingDocument, listElement, container ); | ||
this.indexSource = new PluralAttributeIndexSourceImpl( sourceMappingDocument(), listElement.getListIndex(), container ); | ||
} | ||
|
||
public PluralAttributeIndexSource getIndexSource() { | ||
return indexSource; | ||
} | ||
|
||
@Override | ||
public JaxbListElement getPluralAttributeElement() { | ||
return ( JaxbListElement ) super.getPluralAttributeElement(); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* @see org.hibernate.metamodel.spi.source.PluralAttributeSource#getPluralAttributeNature() | ||
*/ | ||
@Override | ||
public PluralAttributeNature getPluralAttributeNature() { | ||
return PluralAttributeNature.LIST; | ||
} | ||
} |
Oops, something went wrong.