Class-data versus data and methods versus class-methods in OO ABAP

Hi
I was going thorugh following OO ABAP code.
CLASS vessel DEFINITION.
  PUBLIC SECTION.
    METHODS: constructor,
             drive IMPORTING speed_up TYPE i,
             get_id RETURNING value(id) TYPE i.
    CLASS-METHODS: start,
                   objects,
                   inheritance,
                   interfaces,
                   events.
  PROTECTED SECTION.
    DATA: speed TYPE i,
          max_speed TYPE i VALUE 100.
  PRIVATE SECTION.
    CLASS-DATA object_count TYPE i.
    DATA id TYPE i.
ENDCLASS.
Whats is difference between methods and class-methods ?
What is the difference between data and class-data ?

Hi Rajesh,
There are two types of componenets in a class
1)Static components
2) Instance components
Instance components exist for every instance of the class, while static exist only once for any number of instances of the class.
Components of the class are methods, attributes, events etc.
static attributes are represented by CLASS-DATA and instance attributes are represented by DATA.
static methods hence are done by CLASS-METHODS and can access only static attributes.
Instance methods are done by METHODS and can access any attribute.
For eg: supposing that in a class, there is a static attribute. Suppose after one instance is created, we are setting this static attribute value as 10. Now we are creating another instance of the same class. Now when you try to display the value of this attribute, it will be 10.ie. it needs to be initialized once and can be shared between instances.
Just go through this document..You will get nice info from this.
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
If you want to go deeper, like object persistence and all, just refer this document.
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
Regards,
SP.

Similar Messages

  • Class not found -java.security.AccessController.doPrivileged(Native Method)

    The applet was working fine around 6 months back but now the application is throwing the below exception:
    load: class DisiConnectionApplet.class not found.
    java.lang.ClassNotFoundException: DisiConnectionApplet.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed:http://messaging.danskenet.net/ie/NewsTicker/NewsTicker.nsf/f49a4a079e88f527c12572020033b098/$FILE/DisiConnectionApplet/class.class
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 7 more
    Exception: java.lang.ClassNotFoundException: DisiConnectionApplet.class
    I have checked and found the class is on proper place... I googled the issue and found that there might be any issue in IE settings... but didn't get any proper solution...
    I am using IE 6.0 with below Java plug-in :::::::::::::
    Java Plug-in 1.6.0_11
    Java(tm) Plug-in 2 SSV Helper
    Java(tm) Plug-in SSV Helper
    Web Browser Applet Control
    Please let me know what should be done on this case....????

    its exactly that... and who are you calling a fool? I think its a case of the pot calling the kettle black there mate (except you have no right to call me anything, since you are the one looking for help, and we are the ones that know)... oh and check the date... it says aug 2003... is that a month ago? come back in a month and i'll give you your answer then

  • How can i update data of DSO and Cube using ABAP??

    Hello Experts
    I have a requrement in which i need to update/ delete data from DSO and cube based on certain keys using ABAP.
    Please let me know how can i modify contets of cube or active table of DSO.
    Thanks
    Sudeep

    Hi
    I have requirement such that i need to update certain key figures in DSO after certain time.
    for eg. say record with key a is loaded to DSO and currospoding key figure was loaded with value 10
    after few days because of certain parameters changing in system i need to modify key figure value.
    currently i am doing same using 1 self transformation i.e. by loading same data again in same DSO.
    Amount of data is very huge and causing performance issues in system.
    now A is not key but i need to modify record for few combinations which apperar multiple times in DSO.
    Same DSO data is loaded into Cube regularly.
    I may need to update data after gap of few weeks as well.
    This design will be used as template and needto keep whole logic generic.
    So wring Function module can make it generic.
    Thanks
    Sudeep

  • Error while defining class: com.crystaldecisions.data.xml.CRDB_XMLImpl This error indicates that the class: OCA.OCAdbdll.DbDLLOperations could not be located while defining the class: com.crystaldecisions.data.xml.CR...

    Post Author: lkamesam
    CA Forum: Integrated Solutions
    Hi,
            I am running Crystal Reports version 10 from IBM Rational 6.0.1  build 20050725_1800 XML data source. When I try to run the report under WAS 6.0.1 I get the following error:
    Does any body have any clue how to resolve my problem? Thanks
    Error 500: Error while defining class: com.crystaldecisions.data.xml.CRDB_XMLImpl This error indicates that the class: OCA.OCAdbdll.DbDLLOperations could not be located while defining the class: com.crystaldecisions.data.xml.CRDB_XMLImpl This is often caused by having the class at a higher point in the classloader hierarchy Dumping the current context classloader hierarchy: ==> indicates defining classloader *** indicates classloader where the missing class could have been found ==>&#91;0&#93; com.ibm.ws.classloader.CompoundClassLoader@163dd786 Local ClassPath: C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\classes;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\bobj_platform_jsf.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cecore.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\celib.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\ceplugins.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cereports.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\cesession.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\clientlogic.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\Concurrent.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CorbaIDL.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CRDBXMLExternal.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CRDBXMLServer.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalCharting.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalCommon.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalContentModels.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalExporters.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalExportingBase.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalFormulas.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalQueryEngine.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalReportEngine.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\CrystalReportingCommon.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\ebus405.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\icu4j.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\jrcerom.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\jsf_common.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\keycodeDecoder.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\log4j.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\MetafileRenderer.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rasapp.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rascore.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\rpoifs.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\serialization.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\URIUtil.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\webreporting-jsf.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\webreporting.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\xercesImpl.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent\WEB-INF\lib\xmlParserAPIs.jar;C:\Documents and Settings\Administrator\IBM\rationalsdp6.0\workspace\sample1\WebContent; Delegation Mode: PARENT_FIRST &#91;1&#93; com.ibm.ws.classloader.JarClassLoader@338761606 Local Classpath: Delegation mode: PARENT_FIRST &#91;2&#93; com.ibm.ws.classloader.ProtectionClassLoader@38e75786 &#91;3&#93; com.ibm.ws.bootstrap.ExtClassLoader@7e475784 &#91;4&#93; sun.misc.Launcher$AppClassLoader@7e5a5784 &#91;5&#93; sun.misc.Launcher$ExtClassLoader@7e565784 -Original exception- java.lang.NoClassDefFoundError: OCA/OCAdbdll/DbDLLOperations at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code)) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:576) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.crystaldecisions.reports.queryengine.driver.i.<init>(Unknown Source) at com.crystaldecisions.reports.queryengine.driver.i.case(Unknown Source) at com.crystaldecisions.reports.queryengine.av.ak(Unknown Source) at com.crystaldecisions.reports.queryengine.av.else(Unknown Source) at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source) at com.crystaldecisions.reports.queryengine.av.do(Unknown Source) at com.crystaldecisions.reports.queryengine.as.new(Unknown Source) at com.crystaldecisions.reports.queryengine.at.long(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source) at com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source) at com.crystaldecisions.reports.common.ab.a(Unknown Source) at com.crystaldecisions.reports.common.ab.if(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source) at com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory.createReportSource(Unknown Source) at com.crystaldecisions.report.web.a.a.K(Unknown Source) at com.crystaldecisions.report.web.event.aa.a(Unknown Source) at com.crystaldecisions.report.web.event.aa.a(Unknown Source) at com.crystaldecisions.report.web.event.bx.a(Unknown Source) at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source) at com.crystaldecisions.report.web.event.as.a(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source) at com.crystaldecisions.report.web.ServerControl.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.crystaldecisions.report.web.viewer.taglib.ServerControlTag.doEndTag(Unknown Source) at com.crystaldecisions.report.web.viewer.taglib.ReportServerControlTag.doEndTag(Unknown Source) at com.ibm._jsp._sample._jspx_meth_crviewer_viewer_0(_sample.java:135) at com.ibm._jsp._sample._jspService(_sample.java:77) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117) at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171) at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:230) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021) at

    For those who would have the same problem, here is how I could eventually fix it.
    Since the Flex Test Drive is sometimes out of sync with flash builder 4, I recreated a project using other help pages on Adobe site :
    Entry point :
    http://help.adobe.com/en_US/Flex/4.0/AccessingData/WSbde04e3d3e6474c4-668f02f4120d422cf08- 7ffd.html
    As suggested, I used the New Project wizard to create a new project, with :
    Application server type : J2EE
    Check the radio button "Use remote object access service : BlazeDS"
    Then, as indicated in following pages (section "Accessing BlazeDS")... :
    file:///C:/Mes%20documents%20C/Commun/Developpement/Documentation/HT-Tracks/AccessingData/ help.adobe.com/en_US/Flex/4.0/AccessingData/WSbde04e3d3e6474c4-668f02f4120d422cf08-7ffe.ht ml#WSbde04e3d3e6474c4-19a3f0e0122be55e1b7-8000
    ...I selected the "Data / Connect to Data/Services..." menu option, which started the Data/service connection wizard.
    There, I selected a BlazeDS (and not Web Services) service type, and everything went fine.
    Suggestion to adobe staff : maybe it would be useful to update the Flex Test Drive to reflect Flash Builder 4 ?
    Very nice product anyway, so far, congratulations...
    Rgds
    Marc.

  • Xcode, how do you take an app from an idea to a data model, data structure, or class structure?

    Hey everyone!
    I'm a beginner xcoder and computer engineering sophomore and have literally spent every hour of the past few weeks reading as much as I possibly can about becoming a developer.
    I've found plenty of documentation, and guides on how to do very specific things in xcode and objective-C but am still looking for more information on one topic; how do you decide which data models/structures/controllers etc to use?
    I mean, you personally. I've been looking for a resource on this and have not been able to find one. I just finished Apple's iOS Developers Guide and they mention "choosing a data model" but do not describe them in much detail.
    The following is what is provided in the guide:
    ● Choose a basic approach for your data model:
    ● Existing data model code—If you already have data model code written in a C-based language, you
    can integrate that code directly into your iOS apps. Because iOS apps are written in Objective-C, they
    work just fine with code written in other C-based languages. Of course, there is also benefit to writing
    an Objective-C wrapper for any non Objective-C code.
    ● Custom objects data model—A custom object typically combines some simple data (strings, numbers,
    dates, URLs, and so on) with the business logic needed to manage that data and ensure its consistency.
    Custom objects can store a combination of scalar values and pointers to other objects. For example,
    the Foundation framework defines classes for many simple data types and for storing collections of
    other objects. These classes make it much easier to define your own custom objects.
    ● Structured data model—If your data is highly structured—that is, it lends itself to storage in a
    database—use Core Data (or SQLite) to store the data. Core Data provides a simple object-oriented
    model for managing your structured data. It also provides built-in support for some advanced features
    like undo and iCloud. (SQLite files cannot be used in conjunction with iCloud.)
    ● Decide whether you need support for documents:
    The job of a document is to manage your app’s in-memory data model objects and coordinate the storage
    of that data in a corresponding file (or set of files) on disk. Documents normally connote files that the user
    created but apps can use documents to manage non user facing files too. One big advantage of using
    documents is that the UIDocument class makes interacting with iCloud and the local file system much
    simpler. For apps that use Core Data to store their content, the UIManagedDocument class provides similar
    support.
    I suppose my question boils down to, how do you decide which structures to use? If you can provide an example of an app idea and how its implemented that would be very helpful and much appreciated!
    For example, to implement the idea of an app which allows users to progress through levels of knowledge of a certain subject and rewarding them with badges and such (this is not an actual app just a whim) how would one model that?
    Thanks in advance for all your help!!!

    SgtChevelle wrote:
    how do you decide which structures to use?
    Trial and error.
    I wish I had a better answer for you, but that pretty much encapsulates it. There is some, but not much, good wisdom out there, but it takes a significant amount of experience to be able to recognize it. The software development community if currently afflicted with a case of copy-and-paste-itis. And the prognosis is poor.
    The solution is to be brutal to yourself and others. Focus on what you need and ignore everything else. Remember that other people have their own needs and methods and they might not be applicable to you. Apple, for example, can hire thousands of programmers, set them to coding for six months, pick the best results, and have the end-users spend their own time and monety to test it. If you don't have Apple's resources and power, think twice about adopting Apple's approach. And I am talking from a macro to a micro perspective. Apple's sample and boilerplate code is just junk. Don't assume you can't do better. You can.
    Unfortunately, all this takes time and practice. You can read popular books, but never assume that anyone knows more than you do. Maybe they do and maybe they don't. It takes time to figure that out. Just do your best, ignore the naysayers, and doubt other people even more than you doubt yourself.

  • Pass current row data from table and pass it to a method in AM

    Hi All,
    I have a table with row selection enabled. Also for each row I have a select image which on selection should pass the data from one of the columns of the current row selected to a method in AM.
    Can anybody let me know on "How on selection of the image in any row, can I pass the column data to the method in AM?".
    Thanks,
    Vijay

    Hi,
    the most easiest and straight forward approach is
    - Ckick the "Binding" tab at the bottom of the Visual Editor
    - In the Bindings section click teh green plus icon and choose Generic Bindings | Attribute Value
    - point the iterator selection to the iterator used by the table
    - choose the column's attribute name from the list of attributes
    - Create a method on the ApplicatioNModule IMPL class (should take single argument)
    - expose it as a client interfaces so it shows in the Data Controls panel
    - In the "Binding" tab, create a method binding for this exposed method
    - point the method binding argument to #{bindings.column-attribute-name.inptValue}
    So whenever you need to pass the value on to the AM, you just call the method binding
    OperationBinding oper = (OperationBinding) bindings.get("name of method");
    oper.execute();
    Frank

  • Class file build date printout

    I want the class file build date printed out when I run one of my servlets, using the log(...) method. How can I retrieve the servlet class file build date so that I can log it when the servlet starts up please?
    Thanks a lot!
    Charl

    Hi everybody!
    I've got a problem like this. I've got some file which can be modified and i want the date where the file was created not the date where it was modified. How i can do this ?
    thanks for the reply.
    Excuse-me, my english isn't perfect

  • Error:Class java.util.date not found

    i have installed 9iAS on my computer.And i want to develop program on JSP.i tried the url below
    http://eyuksel/servlet/IsItWorking
    and i got "it is working" message.when i try to execute my first jsp file i get the error:
    Errors compiling:d:\ias\apache\apache\htdocs\_pages\\_first.java
    d:\ias\apache\apache\htdocs\_pages\_first.java:55: Class java.util.date not found.
    out.print( new java.util.date() );
    ^
    1 error
    what must i do or how can i install the java classes.
    kind regards...
    null

    Thank you very much.It worked:)
    Java is case-sensitive.
    try
    java.util.Date
    instead of
    java.util.date
    null

  • Mapping SQL data types (especially SMALLINT) to Java classes

    I want to know the reason for a certain pair of exceptions in JDBC�s mapping of SQL data types to Java classes.
    Sun�s web site ( http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/mapping.html ), Sybase�s site, and other sites contain mappings from SQL data types to Java primitive data types and/or Java classes. On that Sun web page, Section 9.9.1 maps mostly to Java primitive data types, and Section 9.9.3 maps mostly to Java classes. For the SQL data types that map to both primitive data types and classes, the class is typically the wrapper class of the primitive data type. For example, SQL�s DOUBLE data type maps to both the double primitive data type and its wrapper class (Double). However, Section 9.7 of that Sun web page says that there are exceptions for SQL�s TINYINT and SMALLINT. As expected, they map to the byte and short primitive data types, but they map to the Integer class, not the Byte and Short classes (which are the wrapper classes for byte and short). The web page does not state the reason for this pair of exceptions. It seems to me that SMALLINT data would either work for both short and Short or fail for both short and Short. I don�t see why it would work for short but fail for Short (as the web page implies).
    Can anybody think of a reason for the pair of exceptions? Thanks.

    ghs wrote:
    1) If a DBMS deals with the short and byte primitive data types (as the various web pages imply that it does), then why would it not deal with the Short and Byte wrapper classes?As another guess, because conversions get a little weird in java. Or at least they did in the past. As I recall (with not a lot of clarity) it is possible to do something like pass a perfectly valid string value into a short and get an exception. Whereas using Integer and then converting to Short works.
    Keep in mind that these are guesses.
    3) What I really want to know is this: If I use wrapper classes of Short and Byte (instead of Integer), what will be the harmful consequences (IF ANY)? So far, I have done some trivial testing with a Short for a SMALLINT column (I have not yet tried any TINYINT columns), and it seems to be working.I considered it risky to not test all target databases and drivers.
    Obviously testing will reveal problems.
    If you don't want to test then you might want to stick with integers.

  • Copy exact structure, data of textflow to its derieved class

    Hi All,
    I am writing a class inherited the TextFlow ( public class
    myclass extends TextFlow {} )
    Now in my new class, i want it able to read textFlow from a
    xml format file. So we could have a tempoary this way:
    After file reading completion event, we could have:
    tempFlow = TextFilter.importToFlow(e.target.data,
    TextFilter.TEXT_LAYOUT_FORMAT);
    Then now i want my class owns this structure and data. (this
    = tempFlow)
    of course, we can assign this = tempFlow.
    Do you know how to do this exact copy?
    Thank you for your answer,
    Best,
    -Hoang Long

    Hi,
    TextFlow not being marked final is a bug. Sorry about that.
    The other classes are marked final and this is an omission.
    That said moving elements from one FlowElement to another can
    be accomplised fairly simply.
    In order to an "exact" copy you'll want to copy the elements.
    for (var idx:int = 0; idx < tempFlow.numChildren; idx++)
    var elem:FlowElement = tempFlow.getChildAt(idx);
    this.addChild(elem.deepCopy());
    To just move the elements this will work.
    while (tempFlow.numChildren)
    this.addChild(tempFlow.getChildAt(0));
    Note that's a recent change that addChild doesn't throw if
    the parameter already has a parent. The latest code removes the
    parameter from its existing parent.
    Best Regards,
    Richard

  • Creating data dictionary type using custom java class

    Hi Experts,
    I have a situation involving the TableSorter mechanism as described here:
    In order to do my sorting correctly, I've created my own Java class implementing the Comparable interface. Based on this class, I need to define my own data dictionary type to be used in a context/table.
    However, I cannot se how this could be achieved as standard Data Dictionary elements can only be based on simple built-in types. Any ideas?
    Kind regards,
    Rasmus Røjkjær Ørtoft

    Hi,
    have you tried to use the following steps while creating your attribute
    1) Right click on the context
    2) New->Attribute
    3) Manually-> Provide a name for the attribute
    4) Browse->Select java native type and select your class
    regards
    Ayyapparaj

  • Inner class a composite data structure

    I am currently working with a small project for my school. Since a class is a combination of data and functions, I consider a class as a data structure and when I use an inner class within a main class, I am combining two data structures and so it is an example for a composite data structure, am i correct, please help, thanks in advance ANY COMMENTS WELCOME . . .

    Hi bobster and ianleslie,
    Thanks for your replies, sorry if I had offended, since I was frustrated at seeing the reply.
    OK, thanks a lot for one thing, that an inner class can be considered as a COMPOSITE relationship if it builds a relationship with outer class. That is great and that is what I was looking for. For example , please have a look at the following code fragment:
    class UpdatePatient {  //OUTER CLASS
    ......//ASSUME THAT THIS IS A MAIN SCREEN with two buttons update and exit
    update.addActionListener(new ActionListener()
                             public void actionPerformed(ActionEvent ev)
                                  System.out.println("Update Pressed");
                                  String item = m_List.getSelectedItem();
                                  int index = m_List.getSelectedIndex();
                                  ListNode[] nodes = (CreateLinkedList.getList()).toArray();
                                  CreateLinkedList.clear();
                                  String name = null;
                                  String add =null;
                                  String contact = null;
                                  for(int i =0; i< nodes.length; i++)
                                       if(i == index)
                                            name = m_Name.getText();
                                            String dob = m_DOB.getText();
                                            StringTokenizer st = new StringTokenizer(dob, "/");
                                            String day = st.nextToken();
                                            String month = st.nextToken();
                                            String year = st.nextToken();
                                            add = m_Address.getText();
                                            contact = m_Contact.getText();
                                            String sex = null;
                                            if(m_Male.getState() == false)
                                                 sex = "Female";
                                            else
                                                 sex = "Male";
                                            Patient pnew = new Patient(name,day,month,year,add,contact,sex);
                                            CreateLinkedList.insertAtExactPosition(pnew);
    }//UPDATEPATIENT completes here
    IS it not a clear representation of COMPOSITE DATA STRUCTURE? I think yes, OK? Thanks all again

  • How to pass data from a Delphi pascal DLL class to a LabView data cluster?

    Hi all,
    I have the following problem:
    I'm using a dll written in Delphi Pascal to transfer data to LabView using the "Call Library Function Node".
    My Delphi dll contains this class:
      TFlash=class
        Fi:TFileInfo;
        constructor Create;
        procedure LoadFi(Filedir_and_nametring);
      end;
     TFileInfo=record
        Idx:smallint; 
        IdxLstSpl:array[0..4] of longint;
        Ms:word;
        Sp:array[0..4]of word;
      end;
    I've created the TFileInfo record datastructure into a LabView cluster to have the "same" variable.
    My plan was to call a Deplhi DLL function with the "Call Library Function Node" and to pass the address of the TFileInfo record, so the data would be passed to the LabView Cluster.
    When I make a simple delphi dll function like this, it works because I only pass an small integer to Labview (without reference to the data structure):
    var  Data:TFlash; 
    function GetNrOfRows(FilePath: string):integer;stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(FilePath); //this function gets the number of rows out of the selected file.
      Result := Data.Fi.Idx;
    end;
    When I try to use this procedure instead of the function above, to pass the address of the whole complex data structure of "Data" (TFileInfo), I'm unable to get the information of "Data" into my Labview cluster:
    procedure LoadFileInfo(FilePath: string; DataPointer: Pointer);stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(FilePath);
      DataPointer:=@Data;
    end;
    Call Library Function Node settings:
    - stdcall (WINAPI)
    - Run in UI Thread
    - Function prototype: void LoadFileInfo(PStr FilePath, void *DataPointer);
          * DataPointer --> Type: 'Adapt to Type' and Data format: 'Pointers to Handles'.
          * FilePath --> Type: 'string', string format: 'pascal string pointer'
    I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.
    I've also read the following posts:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=229930&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=77947&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=51245&requireLogin=False
    (or did I miss something in these posts?)
    Hope my explanation is clear.
    Thx
    Solved!
    Go to Solution.

    Ok, I'm one step further:
    Because it works when passing an integer from the dll to Labview,
    I tried a simple vi containing a cluster with an small integer (16 bit signed Integer) in it and passing the pointer to that cluster:
    same settings:
    Call Library Function Node settings:
    - stdcall (WINAPI)
    - Run in UI Thread
    - Function prototype: void LoadFileInfo(PStr FilePath, void *DataPointer);
          * DataPointer --> Type: 'Adapt to Type' and Data format: 'Pointers to Handles'. (and the cluster wired to the output of the Call Library Function Node)
          * FilePath --> Type: 'string', string format: 'pascal string pointer'
    Changed the Delphi function to:
    procedure LoadFileInfo(FilePath: string; DataPointer: Pinteger);stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(FilePath);  --> this function fills in the data in Data.Fi
      DataPointer^:=Data.Fi.Idx; --> write the smallint on the address given by Labview
    end;
    When I call my DLL this way, the expected value appears in smallint indicator in de cluster on the front panel.
    When I'm passing a pointer from the TFileInfo Type:
    Delphi:
    var  Data:TFlash;
    type  PtrTFileInfo = ^TFileinfo;
    procedure LoadFileInfo(FilePath: string; DataPointer: PtrTFileInfo);stdcall; 
    begin
      Data:=TFlash.Create;
      Data.LoadFi(Copy(FilePath,2,length(FilePath)-1));
      DataPointer^:=Data.Fi;
    end;
    During debugging in my Delphi environment: when I get out of this function and pass this to Labview, an error occurs: access violation at 0x004E7125: read of address failed 0x00002A24. Process stopped.
    Is it actually possible to access data with 2 applications? Delphi--> common stack <--Labview

  • I need a reliable (auto reconnect, no data loss, etc) TCP/CP Socket class

    I have been searching for a third party (free or pay) socket class that will do things that all of us programmers must do:
    reconnect when socket is disconnected
    reconnect and re-send data (so no data loss)
    and implementing all of these other features that we all require for "reliable" network communications over public networks.
    I would like to use this socket class on both my client and server applications. Does one exist somewhere? It certainly must. I want something that is tried and proven. free is great with open source but paying money is okay too. thanks !

    I am surprised at these responses. Using JMS or creating my own ARQ seems to not meet my requirement (lots of overhead in the case of JMS you usually need a middle "server" and the overhead is huge in high bandwidth situations -- lots of cpu and extra bandwidth -- and the ARQ is a nice idea but i really dont want to create anything myself)
    The fact is TCP/IP is unreliable over the internet. anyone who tries to use sockets over the internet recognizes this. It is not an issue of my application but the fact of the internet. the internet is designed with the assumption that the internet is unreliable (hence why the government created ARPA and the internet)
    so what if i loosened the requirement and said it was okay to lose some packets, but i just need something that knows the other side is alive and will reconnect/discnonect appropriately? doesnt this exist already? i mean every tcp/ip programmer is doing this and anyone who implements tcp/ip with the assumption that the "network is reliable" is going to be in big trouble. It doesnt need to be TCP, it can be a reliable UDP (i dont care what transport is used) but i just need something where i can take my existing code, drop in this new class instead of "Socket" and get my project done. it would be nice if it had features like reconnecting, dropping data if it is too old or if there are too many messages. i will be using it in high bandwidth applications (20-50mbps over the internet) and dont need 100% packet reliability, if we drop some packets due to a hiccup that is ok, but i do need it to be intelligent in reconnecting and such.

  • Purpose of declaring the method or class or static and as instance

    what is the purpose of declaring a method in a class or the class itself as static.
    Does it mean we cannot create a copy of that class or method if we declare it as static.
    if so then why do they dont want that class to be created as a copy ?
    Why do they want to declare a class as static
    please provide some conceptual undersatnding regarding the static and instance class with one example

    Static methods are often used for the implementation of utility methods. Please have a look at the class CL_ABAP_CHAR_UTILITIES for example.
    You use the methods of this class in the same way as you would use a function in ABAP (like
    LINES( itab )
    ). You use it in a static way because the functionality is always the same no matter in what context you are calling the function.
    The purpose of instance methods is that their logic is in some way related to an attribute of the object instance that you use to call it.
    For example, you create an instance of object PO (a purchase order) called MY_PO. Then the method
    MY_PO->ADD_POSITION
    would add a position to a concrete PO that has a unique number etc. But if the object has a static method DELETE_POSITION then it just deletes the current position of a PO, regardless on which concrete PO you are acting at the moment.
    I hope this clarifies it for you.
    Regards,
    Mark

  • Change of method consolidation  - duable data for investment and equity

    Dear All!
    There are:  investor uniu - company A and investee unit - company B.
    Company A has had 50% share in company B to 01/2010. - Equity Method.
    Company A has added by 50% share in company B to 03/2010. - Puarches Method.
    I use activity of investment in AFD for investment and equity. :
    When I perform task consolidation of investment there is duble data for investment and equity.
    And when I perform task for Change to Consolidation Group I have message Process is not nessecery.
    Mabye you know why is process not nessecery?
    Thank you in advance for your help.
    Best regards,
    anka
    Edited by: Anka on Mar 25, 2011 5:07 PM

    Dear Sir,
    Thank you for your answer.
    Yes, I have task for change in group consolidation with documents in the posting level 02,12,22. I did not  data in group currency, when I task change in group consolidation, but only in local currency. My mistake.
    I have a new question:
    When I purchase new shares, which the activite of investment I must choose in AFD:
    - step aqusition or increase in capitalization?
    Thank you in advance for your help.
    Best regards,
    anka

Maybe you are looking for

  • How can I get rid of the dark area on top one third of my iphone screen which spoils my background image?

    How can I get rid of the dark area on top one third of my iphone screen which spoils my background image? It seems this problem is caused by the software to increase the readibility of upper letters (clock battery etc.) It be nice to leave us the con

  • Rounding up decimal places

    Hi,can anyone please tell me how to round up a double type value to 6 decimal places. Thank You!

  • Add code to pl/sql pages from web generator designer

    Has anyone tryed to put code before pl/sql procedure that manages web pages with designer ? I'm more specific: i want to put pl/sql code on top the procedure "Forminsert" generated by designer; i know i can use text in the module but generator transf

  • Create WORKSPACE on APEX 2.1 problem

    Hello, I try to create a workspace on an Application Express 2.1.0.00.39 without success. My System: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product PL/SQL Release 10.2.0.1.0 - Production CORE     10.2.0.1.0     Production TNS for Li

  • Change Miro variant

    Hi experts I followed step by step the note 315586 fro change the column sequence in TCODE miro, But the column sequence is not changed.....i Need to change the material position on the 5 colum... how i can do it? best regards Marco