- java.lang.Object
-
- javax.sql.rowset.serial.SerialStruct
-
- All Implemented Interfaces:
- Serializable, Cloneable, Struct
public class SerialStruct extends Object implements Struct, Serializable, Cloneable
A serialized mapping in the Java programming language of an SQL structured type. Each attribute that is not already serialized is mapped to a serialized form, and if an attribute is itself a structured type, each of its attributes that is not already serialized is mapped to a serialized form.In addition, the structured type is custom mapped to a class in the Java programming language if there is such a mapping, as are its attributes, if appropriate.
The
SerialStructclass provides a constructor for creating an instance from aStructobject, a method for retrieving the SQL type name of the SQL structured type in the database, and methods for retrieving its attribute values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SerialStruct(SQLData in, Map<String,Class<?>> map)Constructs aSerialStructobject from the givenSQLDataobject, using the given type map to custom map it to a class in the Java programming language.SerialStruct(Struct in, Map<String,Class<?>> map)Constructs aSerialStructobject from the givenStructobject, using the givenjava.util.Mapobject for custom mapping the SQL structured type or any of its attributes that are SQL structured types.
-
Method Summary
Methods Modifier and Type Method and Description Object[]getAttributes()Retrieves an array ofObjectvalues containing the attributes of the SQL structured type that thisSerialStructobject represents.Object[]getAttributes(Map<String,Class<?>> map)Retrieves the attributes for the SQL structured type that thisSerialStructrepresents as an array ofObjectvalues, using the given type map for custom mapping if appropriate.StringgetSQLTypeName()Retrieves the SQL type name for thisSerialStructobject.
-
-
-
Constructor Detail
-
SerialStruct
public SerialStruct(Struct in, Map<String,Class<?>> map) throws SerialException
Constructs aSerialStructobject from the givenStructobject, using the givenjava.util.Mapobject for custom mapping the SQL structured type or any of its attributes that are SQL structured types.- Parameters:
map- ajava.util.Mapobject in which each entry consists of 1) aStringobject giving the fully qualified name of a UDT and 2) theClassobject for theSQLDataimplementation that defines how the UDT is to be mapped- Throws:
SerialException- if an error occurs- See Also:
Struct
-
SerialStruct
public SerialStruct(SQLData in, Map<String,Class<?>> map) throws SerialException
Constructs aSerialStructobject from the givenSQLDataobject, using the given type map to custom map it to a class in the Java programming language. The type map gives the SQL type and the class to which it is mapped. TheSQLDataobject defines the class to which the SQL type will be mapped.- Parameters:
in- an instance of theSQLDataclass that defines the mapping of the SQL structured type to one or more objects in the Java programming languagemap- ajava.util.Mapobject in which each entry consists of 1) aStringobject giving the fully qualified name of a UDT and 2) theClassobject for theSQLDataimplementation that defines how the UDT is to be mapped- Throws:
SerialException- if an error occurs
-
-
Method Detail
-
getSQLTypeName
public String getSQLTypeName() throws SerialException
Retrieves the SQL type name for thisSerialStructobject. This is the name used in the SQL definition of the structured type- Specified by:
getSQLTypeNamein interfaceStruct- Returns:
- a
Stringobject representing the SQL type name for the SQL structured type that thisSerialStructobject represents - Throws:
SerialException- if an error occurs
-
getAttributes
public Object[] getAttributes() throws SerialException
Retrieves an array ofObjectvalues containing the attributes of the SQL structured type that thisSerialStructobject represents.- Specified by:
getAttributesin interfaceStruct- Returns:
- an array of
Objectvalues, with each element being an attribute of the SQL structured type that thisSerialStructobject represents - Throws:
SerialException- if an error occurs
-
getAttributes
public Object[] getAttributes(Map<String,Class<?>> map) throws SerialException
Retrieves the attributes for the SQL structured type that thisSerialStructrepresents as an array ofObjectvalues, using the given type map for custom mapping if appropriate.- Specified by:
getAttributesin interfaceStruct- Parameters:
map- ajava.util.Mapobject in which each entry consists of 1) aStringobject giving the fully qualified name of a UDT and 2) theClassobject for theSQLDataimplementation that defines how the UDT is to be mapped- Returns:
- an array of
Objectvalues, with each element being an attribute of the SQL structured type that thisSerialStructobject represents - Throws:
SerialException- if an error occurs
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/sql/rowset/serial/serialstruct.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.