|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.federation.InfoEngineInputStream
InfoEngineInputStream uses HTTP to interface with Info*Engine to read objects from remote information sources, and it translates them to Windchill objects.
Field Summary | |
private long |
expirationTime
|
private Hashtable |
nameTranslationTable
|
private String |
prefix
|
private Hashtable |
referenceObject
|
private Hashtable |
remoteObject
|
private static String |
RESOURCE
|
private FederatedInfoEngineService |
service
|
private ServiceIdentifier |
serviceId
|
private InfoEngineTranslationTable |
translationTable
|
private static boolean |
VERBOSE
|
private static boolean |
VERBOSE_CONTENT
|
private static String |
versionID
|
Constructor Summary | |
InfoEngineInputStream(FederatedInfoEngineService service)
Create an InfoEngineInputStream instance. |
|
InfoEngineInputStream(FederatedInfoEngineService service,
Persistable referenceObject)
Create an InfoEngineInputStream instance. |
Method Summary | |
void |
close()
Close the input stream. |
private Object |
createObject()
Create a Java object from the set of attributes previously read from a remote object. |
private Object |
createObject(Class objectClass)
Create a Java object from the set of attributes previously read from a remote object. |
InputStream |
getAsciiStream(String attributeName)
Get the value of a column in the current row as a stream of ASCII characters. |
Hashtable |
getAttributes()
Return the attributes read from the remote object. |
private Object |
getAttributeValue(String fieldName)
Translate a field name to a foreign attribute name and return the associated value from the remote object previously read. |
BigDecimal |
getBigDecimal(String attributeName)
Get the value of a column in the current row as a BigDecimal |
InputStream |
getBinaryStream(String attributeName)
Get the value of a column in the current row as a stream of uninterpreted bytes. |
boolean |
getBoolean(String attributeName)
Get the value of a column in the current row as a Java boolean. |
Boolean |
getBooleanObject(String attributeName)
Get the value of a column in the current row as a Java boolean. |
byte |
getByte(String attributeName)
Get the value of a column in the current row as a Java byte. |
Byte |
getByteObject(String attributeName)
Get the value of a column in the current row as a Java byte. |
byte[] |
getBytes(String attributeName)
Get the value of a column in the current row as a Java byte array. |
char |
getChar(String attributeName)
Get the value of a column in the current row as a Java char. |
Character |
getCharObject(String attributeName)
Get the value of a column in the current row as a Java char. |
String |
getContainer()
Get the current container name. |
Date |
getDate(String attributeName)
Get the value of a column in the current row as a java.sql.Date object. |
double |
getDouble(String attributeName)
Get the value of a column in the current row as a Java double. |
Double |
getDoubleObject(String attributeName)
Get the value of a column in the current row as a Java double. |
float |
getFloat(String attributeName)
Get the value of a column in the current row as a Java float. |
Float |
getFloatObject(String attributeName)
Get the value of a column in the current row as a Java float. |
private Object |
getForeignAttributeValue(String attrName)
Return the value associated with a specified foreign attribute name. |
Object |
getInlineObject(String attributeName,
String blobAttributeName)
Get the value of a blob column as a Java Object. |
int |
getInt(String attributeName)
Get the value of a column in the current row as a Java int. |
Integer |
getIntObject(String attributeName)
Get the value of a column in the current row as a Java int. |
Class |
getJavaClass(Hashtable remoteObject)
Return the Java class associated with a remote object. |
LobLocator |
getLobLocator(String attributeName)
Get a LobLocator for the given attribute. |
long |
getLong(String attributeName)
Get the value of a column in the current row as a Java long. |
Long |
getLongObject(String attributeName)
Get the value of a column in the current row as a Java long. |
Object |
getObject(String attributeName)
Get the value of a column in the current row as a Java object. |
String |
getPrefix()
Return the currently established field name prefix. |
ServiceIdentifier |
getServiceId()
Return the currently established identifier of the service from which the object stream is originating. |
short |
getShort(String attributeName)
Get the value of a column in the current row as a Java short. |
Short |
getShortObject(String attributeName)
Get the value of a column in the current row as a Java short. |
Object |
getSmallObject(String attributeName)
Get the value of a column in the current row as a Java object. |
String |
getString(String attributeName)
Get the value of a column in the current row as a Java String. |
Time |
getTime(String attributeName)
Get the value of a column in the current row as a java.sql.Time object. |
Timestamp |
getTimestamp(String attributeName)
Get the value of a column in the current row as a java.sql.Timestamp object. |
InputStream |
getUnicodeStream(String attributeName)
Get the value of a column in the current row as a stream of Unicode characters and then read in chunks. |
private void |
initialize(FederatedInfoEngineService service,
Persistable referenceObject)
Initialize an InfoEngineInputStream instance. |
boolean |
next()
Satisfies the PersistentRetrieveIfc requirement for a method by this name. |
Hashtable |
readAttributes(String url)
Read a remote object and return a Hashtable containing its attributes. |
ObjectMappable |
readObject(String attribute_name,
ObjectMappable obj,
Class concrete_class,
boolean isRequired)
Get the values corresponding to a nested ObjectMappable Object. |
Object |
readRemoteObject(Hashtable attributes)
Read a remote object and create a Java object from it. |
Object |
readRemoteObject(String url)
Read a remote object and create a Java object from it. |
void |
setPrefix(String prefix)
Establish a field name prefix for all attribute name translations. |
void |
setServiceId(FederatedService service)
Establish the identifier of the service from which the object stream is originating. |
boolean |
wasNull()
A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private static final String RESOURCE
private long expirationTime
private Hashtable nameTranslationTable
private String prefix
private Hashtable referenceObject
private Hashtable remoteObject
private FederatedInfoEngineService service
private ServiceIdentifier serviceId
private InfoEngineTranslationTable translationTable
private static boolean VERBOSE
private static boolean VERBOSE_CONTENT
Constructor Detail |
public InfoEngineInputStream(FederatedInfoEngineService service) throws FederationServicesException
service
- FederatedInfoEngineService object from which the stream originatespublic InfoEngineInputStream(FederatedInfoEngineService service, Persistable referenceObject) throws FederationServicesException
service
- FederatedInfoEngineService object from which the stream originatesreferenceObject
- a Persistable object supplying default attribute valuesMethod Detail |
private void initialize(FederatedInfoEngineService service, Persistable referenceObject) throws FederationServicesException
service
- FederatedInfoEngineService object from which the stream originates
FederationServicesException
public void close()
close
in interface PersistentRetrieveIfc
public void setServiceId(FederatedService service) throws WTPropertyVetoException, FederationServicesException
service
- FederatedService object from which the stream originates
WTPropertyVetoException
FederationServicesException
public ServiceIdentifier getServiceId()
public void setPrefix(String prefix)
prefix
- string to preface to all field names used as
attribute translation keyspublic String getPrefix()
public Object readRemoteObject(String url) throws FederationServicesException
url
- absolute URL of the object to read
FederationServicesException
public Object readRemoteObject(Hashtable attributes) throws FederationServicesException
attributes
- Hashtable containining attributes of object
FederationServicesException
public Hashtable readAttributes(String url) throws FederationServicesException
url
- absolute URL of the remote object to read
FederationServicesException
public Hashtable getAttributes()
private Object createObject() throws FederationServicesException
FederationServicesException
private Object createObject(Class objectClass) throws FederationServicesException
objectClass
- the Java class for which to create an instance
FederationServicesException
public Class getJavaClass(Hashtable remoteObject) throws FederationServicesException
FederationServicesException
private Object getAttributeValue(String fieldName)
fieldName
- name of field in a Java object
private Object getForeignAttributeValue(String attrName)
attrName
- name of foreign attribute
public InputStream getAsciiStream(String attributeName) throws SQLException
getAsciiStream
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public BigDecimal getBigDecimal(String attributeName) throws SQLException
getBigDecimal
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public InputStream getBinaryStream(String attributeName) throws SQLException
getBinaryStream
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public boolean getBoolean(String attributeName) throws SQLException
getBoolean
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Boolean getBooleanObject(String attributeName) throws SQLException
getBooleanObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public byte getByte(String attributeName) throws SQLException
getByte
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Byte getByteObject(String attributeName) throws SQLException
getByteObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public byte[] getBytes(String attributeName) throws SQLException, DatastoreException
getBytes
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.
DatastoreException
public char getChar(String attributeName) throws SQLException
getChar
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Character getCharObject(String attributeName) throws SQLException
getCharObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Date getDate(String attributeName) throws SQLException
getDate
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public double getDouble(String attributeName) throws SQLException
getDouble
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Double getDoubleObject(String attributeName) throws SQLException
getDoubleObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public float getFloat(String attributeName) throws SQLException
getFloat
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Float getFloatObject(String attributeName) throws SQLException
getFloatObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Object getInlineObject(String attributeName, String blobAttributeName) throws SQLException, DatastoreException
PersistentRetrieveIfc
getInlineObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute nameblobAttributeName
- a blob attribute name
SQLException
- if a database-access error occurs.
DatastoreException
public int getInt(String attributeName) throws SQLException
getInt
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Integer getIntObject(String attributeName) throws SQLException
getIntObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public long getLong(String attributeName) throws SQLException
getLong
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Long getLongObject(String attributeName) throws SQLException
getLongObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Object getObject(String attributeName) throws SQLException, DatastoreException
getObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.
DatastoreException
public Object getSmallObject(String attributeName) throws SQLException, DatastoreException
getSmallObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.
DatastoreException
public short getShort(String attributeName) throws SQLException
getShort
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Short getShortObject(String attributeName) throws SQLException
getShortObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public String getString(String attributeName) throws SQLException
getString
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Time getTime(String attributeName) throws SQLException
getTime
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public Timestamp getTimestamp(String attributeName) throws SQLException
getTimestamp
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public InputStream getUnicodeStream(String attributeName) throws SQLException
getUnicodeStream
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.public LobLocator getLobLocator(String attributeName) throws SQLException, DatastoreException
getLobLocator
in interface PersistentRetrieveIfc
attributeName
- a class attribute name
SQLException
- if a database-access error occurs.
DatastoreException
public ObjectMappable readObject(String attribute_name, ObjectMappable obj, Class concrete_class, boolean isRequired) throws SQLException, DatastoreException
readExternal
method.
readObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute nameobj
- the nested objectconcrete_class
- the class to instantiate if needed
SQLException
- if a database-access error occurs.
DatastoreException
- if any other internal error occurs.public String getContainer()
readObject
.
getContainer
in interface PersistentRetrieveIfc
public boolean next() throws SQLException
next
in interface PersistentRetrieveIfc
SQLException
- if a database-access error occurs.public boolean wasNull() throws SQLException
wasNull
in interface PersistentRetrieveIfc
SQLException
- if a database-access error occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |