|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gigaspaces.converter.pojo.ConverterHelper
com.gigaspaces.converter.pojo.Pojo2ExternalEntryConverter
public class Pojo2ExternalEntryConverter
This class is the implementation of the interface IPojoToEntryConverter. It has two major public methods: toEntry(Object POJO), and toPojo(Entry entry). The method toEntry(Object POJO) converts the POJO(java bean) into a GigaSpaces ExternalEntry object. The method toPojo(Entry entry) transforms the GigaSpaces ExternalEntry object into a POJO. This class extends the ConverterHelper.java class, which initiates the POJODescription object for each POJO. The POJODescriptor is initiated by parsing a gs.xml file, or by an annotation if the gs.xml file does not exist which describes the map values of the * POJO to the Entry.
| Constructor Summary | |
|---|---|
Pojo2ExternalEntryConverter()
Empty constructor |
|
Pojo2ExternalEntryConverter(boolean isInvokePropSet)
Constructor |
|
| Method Summary | |
|---|---|
void |
clean()
Clean all the caching data from the converter |
com.gigaspaces.converter.pojo.POJODescription |
getPOJODescription(Class pojoClass,
String className)
Gets the correct POJODescription object that describes the POJO class name. |
IGSEntry |
toEntry(Object pojo)
Transforms the supplied POJO (Plain Old Java Object) into an ExternalEntry object, using the POJODescription object, which maps the POJO fields into the space Entry. |
IGSEntry |
toEntry(Object pojo,
boolean isIgnoreGenerateAutoPK)
Converts a POJO that has a primary key and auto-generator declared, and you don't want to generate the primary key. |
Object |
toPojoFromIGSEntry(IGSEntry igsEntry)
Transforms the supplied IGSEntry into a POJO (Plain Old Java Object). |
| Methods inherited from class com.gigaspaces.converter.pojo.ConverterHelper |
|---|
afterPropertiesSet, getConfiguration, getFile, getInputStream, getURL, setMappingDirectoryLocations, setMappingJarLocations, setMappingResources |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Pojo2ExternalEntryConverter()
public Pojo2ExternalEntryConverter(boolean isInvokePropSet)
isInvokePropSet - indicate if to invoke the method
afterProertiesSet() after setMapping..() methods| Method Detail |
|---|
public IGSEntry toEntry(Object pojo)
toEntry in interface IPojoToEntryConverterpojo - The POJO that is converted.
public IGSEntry toEntry(Object pojo,
boolean isIgnoreGenerateAutoPK)
toEntry in interface IPojoToEntryConverterpojo - the POJOisIgnoreGenerateAutoPK - boolean Indicates that the POJO has a
primary key and an auto-generator declared, and you don't want
to generate the primary key.
InvocationTargetException
IllegalAccessException
IllegalArgumentExceptionpublic Object toPojoFromIGSEntry(IGSEntry igsEntry)
toPojoFromIGSEntry in interface IPojoToEntryConverterigsEntry - - The IGSEntry.
InvocationTargetException
IllegalAccessException
IllegalArgumentException
IllegalAccessException
InstantiationException
public com.gigaspaces.converter.pojo.POJODescription getPOJODescription(Class pojoClass,
String className)
getPOJODescription in interface IPojoToEntryConverterclassName - - The class name.
public void clean()
clean in interface IPojoToEntryConverter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||