Package org.apache.openjpa.event
Class LogOrphanedKeyAction
- java.lang.Object
-
- org.apache.openjpa.event.LogOrphanedKeyAction
-
- All Implemented Interfaces:
OrphanedKeyAction
public class LogOrphanedKeyAction extends Object implements OrphanedKeyAction
Log a message when an orphaned key is discovered.- Since:
- 0.3.2.2
- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description LogOrphanedKeyAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetChannel()The channel to log to.shortgetLevel()The level to log at.Objectorphan(Object oid, OpenJPAStateManager sm, ValueMetaData vmd)Callback received when OpenJPA discovers an orphaned key.voidsetChannel(String channel)The channel to log to.voidsetLevel(short level)The level to log at.voidsetLevel(String level)The level to log at.
-
-
-
Method Detail
-
getChannel
public String getChannel()
The channel to log to. Defaults toorg.apache.openjpa.Runtime.
-
setChannel
public void setChannel(String channel)
The channel to log to. Defaults toorg.apache.openjpa.Runtime.
-
getLevel
public short getLevel()
The level to log at. Defaults toWARN.
-
setLevel
public void setLevel(short level)
The level to log at. Defaults toWARN.
-
setLevel
public void setLevel(String level)
The level to log at. Defaults toWARN.
-
orphan
public Object orphan(Object oid, OpenJPAStateManager sm, ValueMetaData vmd)
Description copied from interface:OrphanedKeyActionCallback received when OpenJPA discovers an orphaned key.- Specified by:
orphanin interfaceOrphanedKeyAction- Parameters:
oid- the orphaned keysm- the instance representing the record in which the key was discovered; may be nullvmd- the value in which the key was discovered- Returns:
- the value to load into field
fmd; typicallynull
-
-