对象类型的原型:create [or replace] object type object_name [authid {definer | current_user}] id object
([instance_variables{sql_datatype | plsql_datatype}],[constructor function constructor_name[(parameter_list)] return result as self]). pl/sql对象体和包体一样必须一一实现它们的声明。inside the database instance, user accounts are called schemas. the superuser schemas are known as sys and system/ the sys schema contains the data catelo and as a rule should never used for routine administration. the system schema has a master set of roles and privileges that enable the dna to use it like a superuser account., and it contains administrative views to the data catalog.
the input file contains special markup that the expander replaces with production code when it creates the output code. java.util.logging.filter objects are useful when we want more fine-grained control over the logging. we have already seen that logging information is filtered with its associated logging level. a filter can be attached to both logger objects and handler objects. each can apply separate filter objects to one particular logrecors before logging it. filter objects by rule have to implement the java.util.logging.filter interface which defines a single method. handler objects are capable of filtering logging requests and printing them to different destinations. before finally printing logging information, handler objects use formatter objects to convert logging information to different human-readable representations. formatter objects help structure data in any formatting style that is useful for the application. it is also vitally important to render logging infromating in a well-structured and meaningful manner so that it can be used for future analysis. the objects that accomplish the task of producing log information in different formats are called formatter objects. it is important you have an understanding of the architecture of the jdk 1.4 logging api before we discuss formatter object in detail. the logger objects internally creates a logrecord object. the logrecord object encapsulates the logging information. the logger objects has an associated handler object which manages the distribution of log messages. each handler object will have a formatter object associated with it that is responsible for formating the log messages with appropriate formatting styles. if a formatter is not specified with the handler object, it uses the default formatter object associated with the respective handler objects or any other formatter object associated with the parent handler object. apart from producing log messgaes in different structures, the formatter objects are also responsible for localization of data. the localization of logging information is performed by attaching a java.util.resourcebundle object to the logrecord object. formatter objects use the resourcebundle associated with each logrecord object, and the bulk of the formating and localization work is done within the formatmessage() method of the formatter object. most of the logger object use a message string as a parameter. this message parameter can also represent the localization key. if the logrecord onjects has a resourcebundle associated with it and the resourcebundle has a mapping for the message string. the message string is replaced by the localized values. formatter objects typically use the java.text.messageformat style of formating. a formarrer object first tries to locate the specified resourcebundle objects with the active thread's contextclassloader . if the contextclassloader is null, then it tries to locate the resource bundle with the systemclassloader. we will see how to develop a localization example later in this chapter. there are two types of formatter objects defined in the jdk1.4 logging api. java,util.logging.simpleformatter this produces a brief human-readable summary of the logging information. java,util.logging.xmlformatter this produces logging information in a structured xml format.

被折叠的 条评论
为什么被折叠?



