Package org.jpox.exceptions

Examples of org.jpox.exceptions.JPOXException


                return registerBundle(mf,manifest);
            }
        }
        catch (IOException e)
        {
            throw new JPOXException(LOCALISER.msg("024008", manifest), e).setFatal();
        }
        finally
        {
            if (is != null)
            {
View Full Code Here


            {
                String msg = LOCALISER.msg("024009", bundle.getSymbolicName(),
                    bundle.getManifestLocation(), previousBundle.getManifestLocation());
                if (bundleCheckType.equalsIgnoreCase("EXCEPTION"))
                {
                    throw new JPOXException(msg);
                }
                else if (bundleCheckType.equalsIgnoreCase("LOG"))
                {
                    JPOXLogger.PLUGIN.warn(msg);
                }
View Full Code Here

    public synchronized void populate(ClassLoaderResolver clr, ClassLoader primary)
    {
        if (isInitialised() || isPopulated())
        {
            JPOXLogger.METADATA.error(LOCALISER.msg("044068",name));
            throw new JPOXException(LOCALISER.msg("044068",fullName)).setFatal();
        }
        if (populating)
        {
            return;
        }
View Full Code Here

     */
    public Object getNewSingleFieldIdentity(Class idType, Class pcType, Object value)
    {
        if (idType == null)
        {
            throw new JPOXException(LOCALISER.msg("029001", pcType)).setFatal();
        }
        if (pcType == null)
        {
            throw new JPOXException(LOCALISER.msg("029000", idType)).setFatal();
        }
        if (value == null)
        {
            throw new JPOXException(LOCALISER.msg("029003", idType, pcType)).setFatal();
        }
        if (!SingleFieldIdentity.class.isAssignableFrom(idType))
        {
            throw new JPOXException(LOCALISER.msg("029002", idType.getName(), pcType.getName())).setFatal();
        }

        SingleFieldIdentity id = null;
        Class keyType = null;
        if (idType == LongIdentity.class)
        {
            keyType = Long.class;
            if (!(value instanceof Long))
            {
                throw new JPOXException(LOCALISER.msg("029004", idType.getName(),
                    pcType.getName(), value.getClass().getName(), "Long")).setFatal();
            }
        }
        else if (idType == IntIdentity.class)
        {
            keyType = Integer.class;
            if (!(value instanceof Integer))
            {
                throw new JPOXException(LOCALISER.msg("029004", idType.getName(),
                    pcType.getName(), value.getClass().getName(), "Integer")).setFatal();
            }
        }
        else if (idType == StringIdentity.class)
        {
            keyType = String.class;
            if (!(value instanceof String))
            {
                throw new JPOXException(LOCALISER.msg("029004", idType.getName(),
                    pcType.getName(), value.getClass().getName(), "String")).setFatal();
            }
        }
        else if (idType == ByteIdentity.class)
        {
            keyType = Byte.class;
            if (!(value instanceof Byte))
            {
                throw new JPOXException(LOCALISER.msg("029004", idType.getName(),
                    pcType.getName(), value.getClass().getName(), "Byte")).setFatal();
            }
        }
        else if (idType == ShortIdentity.class)
        {
            keyType = Short.class;
            if (!(value instanceof Short))
            {
                throw new JPOXException(LOCALISER.msg("029004", idType.getName(),
                    pcType.getName(), value.getClass().getName(), "Short")).setFatal();
            }
        }
        else if (idType == CharIdentity.class)
        {
            keyType = Character.class;
            if (!(value instanceof Character))
            {
                throw new JPOXException(LOCALISER.msg("029004", idType.getName(),
                    pcType.getName(), value.getClass().getName(), "Character")).setFatal();
            }
        }
        else
        {
View Full Code Here

     */
    public void setParent(MetaData md)
    {
        if (isPopulated() || isInitialised())
        {
            throw new JPOXException("Cannot set parent of " + this + " since it is already populated/initialised");
        }
        this.parent = md;
    }
View Full Code Here

        return "Somehow " + getClass().getName() + "." + method + "() was called, which should have been impossible";
    }

    public void storeBooleanField(int fieldNumber, boolean value)
    {
        throw new JPOXException(failureMessage("storeBooleanField")).setFatal();
    }
View Full Code Here

        throw new JPOXException(failureMessage("storeBooleanField")).setFatal();
    }

    public boolean fetchBooleanField(int fieldNumber)
    {
        throw new JPOXException(failureMessage("fetchBooleanField")).setFatal();
    }
View Full Code Here

        throw new JPOXException(failureMessage("fetchBooleanField")).setFatal();
    }

    public void storeCharField(int fieldNumber, char value)
    {
        throw new JPOXException(failureMessage("storeCharField")).setFatal();
    }
View Full Code Here

        throw new JPOXException(failureMessage("storeCharField")).setFatal();
    }

    public char fetchCharField(int fieldNumber)
    {
        throw new JPOXException(failureMessage("fetchCharField")).setFatal();
    }
View Full Code Here

        throw new JPOXException(failureMessage("fetchCharField")).setFatal();
    }

    public void storeByteField(int fieldNumber, byte value)
    {
        throw new JPOXException(failureMessage("storeByteField")).setFatal();
    }
View Full Code Here

TOP

Related Classes of org.jpox.exceptions.JPOXException

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.