Package com.sforce.ws.bind
Class TypeMapper
- java.lang.Object
-
- com.sforce.ws.bind.TypeMapper
-
public class TypeMapper extends Object
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 Modifier and Type Class Description static classTypeMapper.PartialArrayException
-
Field Summary
Fields Modifier and Type Field Description static StringHTMLbooleanwriteFieldXsiType
-
Constructor Summary
Constructors Constructor Description TypeMapper()TypeMapper(String packagePrefix, String interfacePackagePrefix, boolean javaTime)
-
Method Summary
-
-
-
Field Detail
-
HTML
public static final String HTML
- See Also:
- Constant Field Values
-
writeFieldXsiType
public boolean writeFieldXsiType
-
-
Method Detail
-
writeFieldXsiType
public void writeFieldXsiType(boolean flag)
-
setPackagePrefix
public void setPackagePrefix(String packagePrefix)
-
getPackagePrefix
public String getPackagePrefix()
-
getInterfacePackagePrefix
public String getInterfacePackagePrefix()
-
setInterfacePackagePrefix
public void setInterfacePackagePrefix(String interfacePackagePrefix)
-
isKeyWord
public boolean isKeyWord(String token)
-
setConfig
public void setConfig(ConnectorConfig config)
-
isWellKnownType
public boolean isWellKnownType(String namespace, String name)
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
-
getJavaClassName
public String getJavaClassName(QName xmltype, Types types, boolean nillable)
returns java class name for the specified xml complex type- Parameters:
xmltype- xml complex typetypes- typesnillable- nillable- Returns:
- java class name
-
writeXsiType
public void writeXsiType(XmlOutputStream out, String typeNS, String type) throws IOException
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
public String writeDouble(double value)
-
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
public void consumeStartTag(XmlInputStream in) throws IOException, ConnectionException
- Throws:
IOExceptionConnectionException
-
consumeEndTag
public void consumeEndTag(XmlInputStream in) throws IOException, ConnectionException
- Throws:
IOExceptionConnectionException
-
verifyElement
public boolean verifyElement(XmlInputStream in, TypeInfo info) throws ConnectionException
- Throws:
ConnectionException
-
isElement
public boolean isElement(XmlInputStream in, TypeInfo info) throws ConnectionException
- 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
public double parseDouble(String strValue)
-
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
public QName getXsiType(XmlInputStream in)
-
setGenerateInterfaces
public void setGenerateInterfaces(boolean generateInterfaces)
-
generateInterfaces
public boolean generateInterfaces()
-
setGenerateExtendedErrorCodes
public void setGenerateExtendedErrorCodes(boolean generateExtendedErrorCodes)
-
getGenerateExtendedErrorCodes
public boolean getGenerateExtendedErrorCodes()
-
-