Package org.jpox.store.query

Examples of org.jpox.store.query.IncompatibleQueryElementTypeException


    public QueryExpression newQueryStatement(Class candidateClass, DatastoreIdentifier candidateAlias)
    {
        String extentType = view.getType();
        if (!extentType.equals(candidateClass.getName()))
        {
            throw new IncompatibleQueryElementTypeException(extentType, candidateClass.getName());
        }

        return ((MappedStoreManager)storeMgr).getDatastoreAdapter().newQueryStatement(view, om.getClassLoaderResolver());
    }
View Full Code Here


            DatastoreIdentifier candidateAlias)
    {
        // TODO Use the candidateAlias
        if (!sm.getObjectManager().getClassLoaderResolver().isAssignableFrom(elementType,candidateClass))
        {
            throw new IncompatibleQueryElementTypeException(elementType, candidateClass);
        }

        ClassLoaderResolver clr = sm.getObjectManager().getClassLoaderResolver();
        DatastoreClass candidateTable = storeMgr.getDatastoreClass(candidateClass, clr);
View Full Code Here

    {
        ClassLoaderResolver clr = stmt.getClassLoaderResolver();
        if (!clr.isAssignableFrom(elementType, filteredElementType) &&
            !clr.isAssignableFrom(filteredElementType, elementType))
        {
            throw new IncompatibleQueryElementTypeException(elementType, filteredElementType.getName());
        }
        DatastoreContainerObject filteredElementTable = storeMgr.getDatastoreClass(filteredElementType.getName(), clr);

        if (stmt.getTableExpression(elementTableAlias) == null)
        {
View Full Code Here

            DatastoreIdentifier candidateAlias)
    {
        // TODO Use the candidateAlias
        if (!sm.getObjectManager().getClassLoaderResolver().isAssignableFrom(elementType, candidateClass))
        {
            throw new IncompatibleQueryElementTypeException(elementType, candidateClass);
        }

        ClassLoaderResolver clr = sm.getObjectManager().getClassLoaderResolver();
        DatastoreContainerObject candidateTable = storeMgr.getDatastoreClass(candidateClass, clr);
View Full Code Here

        {
            if (candidateType.isInterface())
            {
                if (!candidateType.isAssignableFrom(sourceType))
                {
                    throw new IncompatibleQueryElementTypeException(candidateFullClassName, sourceType.getName());
                }
            }
            else
            {
                throw new IncompatibleQueryElementTypeException(sourceType.getName(), candidateType.getName());
            }
        }

        // Give warning if table is incorrect for candidate and subclasses not included in query.
        if (!sourceTable.equals(candidateTable) && !includeSubclasses)
View Full Code Here

    {
        ClassLoaderResolver clr = stmt.getClassLoaderResolver();
        if (!clr.isAssignableFrom(elementType, filteredElementType) &&
            !clr.isAssignableFrom(filteredElementType, elementType))
        {
            throw new IncompatibleQueryElementTypeException(elementType, filteredElementType.getName());
        }
        DatastoreContainerObject filteredElementTable = storeMgr.getDatastoreClass(filteredElementType.getName(), clr);

        if (stmt.getTableExpression(elementTableAlias) == null)
        {
View Full Code Here

        {
            throw new JPOXUserException(LOCALISER.msg("056022"));
        }
        if (!clr.isAssignableFrom(valueType,candidateClass))
        {
            throw new IncompatibleQueryElementTypeException(valueType, candidateClass);
        }

        ClassLoaderResolver clr = sm.getObjectManager().getClassLoaderResolver();
        DatastoreIdentifier mapTableAlias = storeMgr.getIdentifierFactory().newIdentifier(IdentifierFactory.TABLE, "map");
        QueryExpression stmt = dba.newQueryStatement(mapTable, mapTableAlias, clr);
View Full Code Here

    {
        ClassLoaderResolver clr=stmt.getClassLoaderResolver();
        if (!clr.isAssignableFrom(keyType,filteredKeyType) &&
            !clr.isAssignableFrom(filteredKeyType,keyType))
        {
            throw new IncompatibleQueryElementTypeException(keyType, filteredKeyType == null ? null : filteredKeyType.getName());
        }

        // Join the map table on the owner ID column (apply to any unions)
        LogicSetExpression mapTblExpr = stmt.newTableExpression(mapTable, mapTableAlias);
        ScalarExpression ownerMapExpr = this.ownerMapping.newScalarExpression(stmt,stmt.getTableExpression(mapTableAlias));
View Full Code Here

    {
        ClassLoaderResolver clr=stmt.getClassLoaderResolver();
        if (!clr.isAssignableFrom(valueType, filteredValueType) &&
            !clr.isAssignableFrom(filteredValueType, valueType))
        {
            throw new IncompatibleQueryElementTypeException(valueType, filteredValueType==null ? null : filteredValueType.getName());
        }

        // Join the map table on the owner ID column
        LogicSetExpression mapTblExpr = stmt.newTableExpression(mapTable, mapTableAlias);
        ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt,ownerTe);
View Full Code Here

        {
            throw new JPOXUserException(LOCALISER.msg("056021"));
        }
        if (!clr.isAssignableFrom(elementType, candidateClass))
        {
            throw new IncompatibleQueryElementTypeException(elementType, candidateClass);
        }

        ClassLoaderResolver clr = sm.getObjectManager().getClassLoaderResolver();
        DatastoreIdentifier listTableAlias = storeMgr.getIdentifierFactory().newIdentifier(
            IdentifierFactory.TABLE, listName);
View Full Code Here

TOP

Related Classes of org.jpox.store.query.IncompatibleQueryElementTypeException

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.