Package com.sforce.ws.bind
Class TypeMapper
java.lang.Object
com.sforce.ws.bind.TypeMapper
This class is used at runtime to bind xml document to java object and java objects
back to xml.
- Since:
- 1.0 Nov 29, 2005
- Version:
- 1.0
- Author:
- http://cheenath.com
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeMapper(String packagePrefix, String interfacePackagePrefix, boolean javaTime) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddeserialize(String value, QName type) booleanbooleangetJavaClassName(QName xmltype, Types types, boolean nillable) returns java class name for the specified xml complex typestatic Stringstatic StringgetXmlType(String javaType) booleanisElement(XmlInputStream in, TypeInfo info) booleanbooleanbooleanisWellKnownType(String namespace, String name) is this a well know type.doubleparseDouble(String strValue) booleanreadBoolean(XmlInputStream in, TypeInfo info, Class<?> type) readDecimal(XmlInputStream in, TypeInfo info, Class<?> type) doublereadDouble(XmlInputStream in, TypeInfo info, Class<?> type) floatreadFloat(XmlInputStream in, TypeInfo info, Class<?> type) intreadInt(XmlInputStream in, TypeInfo info, Class<?> type) longreadLong(XmlInputStream in, TypeInfo info, Class<?> type) readObject(XmlInputStream in, TypeInfo info, Class<?> type) readPartialArray(XmlInputStream in, TypeInfo result__typeInfo, Class<?> type) readString(XmlInputStream in, TypeInfo info, Class<?> type) voidsetConfig(ConnectorConfig config) voidsetGenerateExtendedErrorCodes(boolean generateExtendedErrorCodes) voidsetGenerateInterfaces(boolean generateInterfaces) voidsetInterfacePackagePrefix(String interfacePackagePrefix) voidsetPackagePrefix(String packagePrefix) booleanverifyElement(XmlInputStream in, TypeInfo info) voidvoidwriteBoolean(XmlOutputStream out, TypeInfo info, boolean value, boolean isSet) writeDouble(double value) voidwriteDouble(XmlOutputStream out, TypeInfo info, double value, boolean isSet) voidwriteFieldXsiType(boolean flag) voidwriteFloat(XmlOutputStream out, TypeInfo info, float value, boolean isSet) voidwriteInt(XmlOutputStream out, TypeInfo info, int value, boolean isSet) voidwriteLong(XmlOutputStream out, TypeInfo info, long value, boolean isSet) voidwriteObject(XmlOutputStream out, TypeInfo info, Object value, boolean isSet) voidwriteString(XmlOutputStream out, TypeInfo info, String value, boolean isSet) voidwriteXsiType(XmlOutputStream out, String typeNS, String type) write xsi type.
-
Field Details
-
HTML
- See Also:
-
writeFieldXsiType
public boolean writeFieldXsiType
-
-
Constructor Details
-
TypeMapper
public TypeMapper() -
TypeMapper
-
-
Method Details
-
writeFieldXsiType
public void writeFieldXsiType(boolean flag) -
setPackagePrefix
-
getPackagePrefix
-
getInterfacePackagePrefix
-
setInterfacePackagePrefix
-
isKeyWord
-
setConfig
-
isWellKnownType
is this a well know type. If it is a well known type, then there is no need to generate a class for the type.- Parameters:
namespace- namespace of the typename- name of the type- Returns:
- true if this is a well known type
-
isSObject
-
getJavaClassName
returns java class name for the specified xml complex type- Parameters:
xmltype- xml complex typetypes- typesnillable- nillable- Returns:
- java class name
-
getXmlType
-
writeXsiType
write xsi type. Called if a type has a base class.- Parameters:
out- xml out put streamtypeNS- namespace of the typetype- name of the type- Throws:
IOException- failed to write
-
writeString
public void writeString(XmlOutputStream out, TypeInfo info, String value, boolean isSet) throws IOException - Throws:
IOException
-
writeBoolean
public void writeBoolean(XmlOutputStream out, TypeInfo info, boolean value, boolean isSet) throws IOException - Throws:
IOException
-
writeInt
public void writeInt(XmlOutputStream out, TypeInfo info, int value, boolean isSet) throws IOException - Throws:
IOException
-
writeLong
public void writeLong(XmlOutputStream out, TypeInfo info, long value, boolean isSet) throws IOException - Throws:
IOException
-
writeFloat
public void writeFloat(XmlOutputStream out, TypeInfo info, float value, boolean isSet) throws IOException - Throws:
IOException
-
writeDouble
public void writeDouble(XmlOutputStream out, TypeInfo info, double value, boolean isSet) throws IOException - Throws:
IOException
-
writeDouble
-
writeObject
public void writeObject(XmlOutputStream out, TypeInfo info, Object value, boolean isSet) throws IOException - Throws:
IOException
-
verifyTag
public void verifyTag(String namespace1, String name1, String namespace2, String name2) throws ConnectionException - Throws:
ConnectionException
-
consumeStartTag
- Throws:
IOExceptionConnectionException
-
consumeEndTag
- Throws:
IOExceptionConnectionException
-
verifyElement
- Throws:
ConnectionException
-
isElement
- Throws:
ConnectionException
-
readString
public String readString(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
readInt
public int readInt(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
readLong
public long readLong(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
readFloat
public float readFloat(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
readBoolean
public boolean readBoolean(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
readDouble
public double readDouble(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
readDecimal
public BigDecimal readDecimal(XmlInputStream in, TypeInfo info, Class<?> type) throws IOException, ConnectionException - Throws:
IOExceptionConnectionException
-
parseDouble
-
deserialize
-
readObject
public Object readObject(XmlInputStream in, TypeInfo info, Class<?> type) throws ConnectionException, IOException - Throws:
ConnectionExceptionIOException
-
readPartialArray
public Object readPartialArray(XmlInputStream in, TypeInfo result__typeInfo, Class<?> type) throws ConnectionException, IOException - Throws:
ConnectionExceptionIOException
-
getXsiType
-
getType
-
getPrefix
-
setGenerateInterfaces
public void setGenerateInterfaces(boolean generateInterfaces) -
generateInterfaces
public boolean generateInterfaces() -
setGenerateExtendedErrorCodes
public void setGenerateExtendedErrorCodes(boolean generateExtendedErrorCodes) -
getGenerateExtendedErrorCodes
public boolean getGenerateExtendedErrorCodes()
-