Package org.qi4j.api.common

Examples of org.qi4j.api.common.QualifiedName


        {
            newEntityState.setAssociationValue( fromAssociationEntry.getKey(), fromAssociationEntry.getValue() );
        }
        for( Map.Entry<QualifiedName, ManyAssociationState> fromManyAssociationEntry : manyAssociations.entrySet() )
        {
            QualifiedName qName = fromManyAssociationEntry.getKey();
            ManyAssociationState fromManyAssoc = fromManyAssociationEntry.getValue();
            ManyAssociationState toManyAssoc = newEntityState.manyAssociationValueOf( qName );
            for( EntityReference entityReference : fromManyAssoc )
            {
                toManyAssoc.add( 0, entityReference );
            }
        }
        for( Map.Entry<QualifiedName, NamedAssociationState> fromNamedAssociationEntry : namedAssociations.entrySet() )
        {
            QualifiedName qName = fromNamedAssociationEntry.getKey();
            NamedAssociationState fromNamedAssoc = fromNamedAssociationEntry.getValue();
            NamedAssociationState toNamedAssoc = newEntityState.namedAssociationValueOf( qName );
            for( String name : fromNamedAssoc )
            {
                toNamedAssoc.put( name, fromNamedAssoc.get( name ) );
View Full Code Here


                                               List<CompositeDescriptorInfo> vDescriptors,
                                               Set<String> enumValues,
                                               Boolean setQNameTableNameToNull
    )
    {
        QualifiedName qName = pType.qualifiedName();
        if( !newQNames.contains( qName ) && !qName.name().equals( Identity.class.getName() ) )
        {
            newQNames.add( qName );
            // System.out.println("QName: " + qName + ", hc: " + qName.hashCode());
            QNameInfo info = qNameInfos.get( qName );
            if( info == null )
View Full Code Here

    {
        for( AssociationDescriptor assoDesc : entityDesc.state().associations() )
        {
            if( SQLSkeletonUtil.isQueryable( assoDesc.accessor() ) )
            {
                QualifiedName qName = assoDesc.qualifiedName();
                if( !extractedQNames.containsKey( qName ) )
                {
                    extractedQNames.put( qName,//
                                         QNameInfo.fromAssociation( //
                        qName, //
View Full Code Here

                                               Boolean setQNameTableNameToNull
    )
    {
        for( AssociationDescriptor mAssoDesc : entityDesc.state().manyAssociations() )
        {
            QualifiedName qName = mAssoDesc.qualifiedName();
            if( SQLSkeletonUtil.isQueryable( mAssoDesc.accessor() ) )
            {
                if( !extractedQNames.containsKey( qName ) )
                {
                    extractedQNames.put( //
View Full Code Here

    {
        for( AssociationDescriptor aDesc : state.entityDescriptor().state().associations() )
        {
            if( SQLSkeletonUtil.isQueryable( aDesc.accessor() ) )
            {
                QualifiedName qName = aDesc.qualifiedName();
                PreparedStatement ps = qNameInsertPSs.get( qName );
                EntityReference ref = state.associationValueOf( qName );
                if( ref != null )
                {
                    insertToAllQNamesPS.setInt( 1, qNamePK );
                    insertToAllQNamesPS.setLong( 2, entityPK );
                    insertToAllQNamesPS.addBatch();

                    ps.setInt( 1, qNamePK );
                    ps.setLong( 2, entityPK );
                    ps.setString( 3, ref.identity() );
                    ps.addBatch();

                    ++qNamePK;
                }
            }
        }

        for( AssociationDescriptor mDesc : state.entityDescriptor().state().manyAssociations() )
        {
            if( SQLSkeletonUtil.isQueryable( mDesc.accessor() ) )
            {
                QualifiedName qName = mDesc.qualifiedName();
                PreparedStatement ps = qNameInsertPSs.get( qName );
                Integer index = 0;
                for( EntityReference ref : state.manyAssociationValueOf( qName ) )
                {
                    if( ref != null )
View Full Code Here

            @Override
            public void processWhereClause( QuerySpecificationBuilder builder,
                                            BooleanBuilder afterWhere,
                                            JoinType joinStyle, Integer firstTableIndex, Integer lastTableIndex )
            {
                QualifiedName qName
                              = QualifiedName.fromAccessor( predicate.property().accessor() );
                String columnName;
                if( qName.type().equals( Identity.class.getName() ) )
                {
                    columnName = DBNames.ENTITY_TABLE_IDENTITY_COLUMN_NAME;
                }
                else
                {
View Full Code Here

            for( Integer idx = 0; idx < orderBy.length; ++idx )
            {
                if( orderBy[idx] != null )
                {
                    PropertyFunction<?> ref = orderBy[idx].property();
                    QualifiedName qName = QualifiedName.fromAccessor( ref.accessor() );
                    QNameInfo info = this._state.qNameInfos().get().get( qName );
                    qNames[idx] = info;
                    if( info == null )
                    {
                        throw new InternalError( "No qName info found for qName [" + qName + "]." );
View Full Code Here

        BooleanFactory b = vendor.getBooleanFactory();
        ColumnsFactory c = vendor.getColumnsFactory();

        while( !qNameStack.isEmpty() )
        {
            QualifiedName qName = qNameStack.pop();
            PropertyFunction<?> ref = refStack.pop();
            if( !qName.type().equals( Identity.class.getName() ) )
            {
                QNameInfo info = this._state.qNameInfos().get().get( qName );
                if( info == null )
                {
                    throw new InternalError( "No qName info found for qName [" + qName + "]." );
View Full Code Here

            qNameStack.add( QualifiedName.fromAccessor( reference.getAccessor() ) );
            reference = reference.getTraversedAssociation();
        }
        while( !qNameStack.isEmpty() )
        {
            QualifiedName qName = qNameStack.pop();
            QNameInfo info = this._state.qNameInfos().get().get( qName );
            if( info == null )
            {
                throw new InternalError( "No qName info found for qName [" + qName + "]." );
            }
View Full Code Here

        }
        else if( propertyFunction.traversedProperty() != null )
        {
            subject = addTriple( propertyFunction.traversedProperty(), false ).value;
        }
        QualifiedName qualifiedName = QualifiedName.fromAccessor( propertyFunction.accessor() );
        String prefix = addNamespace( qualifiedName.toNamespace() );
        return addTriple( subject, prefix + ":" + qualifiedName.name(), optional );
    }
View Full Code Here

TOP

Related Classes of org.qi4j.api.common.QualifiedName

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.