org.datanucleus.store.db4o.exceptions.ObjectNotActiveException Maven / Gradle / Ivy
/**********************************************************************
Copyright (c) 2006 Andy Jefferson and others. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Contributors:
...
**********************************************************************/
package org.datanucleus.store.db4o.exceptions;
import org.datanucleus.store.db4o.DB4OStoreManager;
import org.datanucleus.exceptions.NucleusException;
import org.datanucleus.util.Localiser;
import org.datanucleus.util.StringUtils;
/**
* Exception thrown when traversing an object graph and we find an object that is
* not activated by DB4O (end of the fetch graph).
*
* @version $Revision: 1.1 $
*/
public class ObjectNotActiveException extends NucleusException
{
private static final Localiser LOCALISER=Localiser.getInstance("org.datanucleus.store.db4o.Localisation",
DB4OStoreManager.class.getClassLoader());
/** The object that is not activated. */
private final Object pc;
/**
* Constructs a not active exception
* @param pc The object
*/
public ObjectNotActiveException(Object pc)
{
super(LOCALISER.msg("DB4O.ObjectNotActive", StringUtils.toJVMIDString(pc)));
this.pc = pc;
}
/**
* Accessor for the object that is not active.
* @return The object
*/
public Object getObject()
{
return pc;
}
}