Dumb question about super/sub classes in WDJ

In WDJ, if you want to use some method M of some subclass B that inherits from some class A (because you've customized method M in superclass B), don't you call the method of class B in your WDJ code ???

David,
Actually, this is just Java.
As with any OOP language you get polymorphic objects behavior -- you may use subclass whenever superclass is necessary. Also the version of method called will be always method from the "most derived class" -- actual class used when instantiating object, not the version from class used for declaring variable.
By the way, this differs java from C++/C# -- all methods are virtual by nature, you should not use "override" keyword to explicitly mark method as overwritten. This C# feature bugs me several times when I did my first steps with .NET.
Valery Silaev
SaM Solutions
http://www.sam-solutions.net

Similar Messages

  • Less dumb follow-up question about super/sub classes in WDJ?

    This is a follow-up question to the question which Maksim answered in this thread:
    Dumb question about super/sub classes in WDJ
    Question:
    Is there any kind of weird C++-like statement that you can put at the top of a WDJ module to force the module to interpret any reference to superclass A as a reference to some specific subclass B of A ???

    David,
    1. Java has no preprocessor, so C++ tricks are not available. Also I would not recommend such tricks even in C++ if you don't want to turn your colleagues working with same code into personal enemies.
    2. The phrase "easier to create a WDJ custom class loader " makes me smile. First, it's not that simple to interfere WDJ class loading scheme. Plus custom class loaders is not trivial Java topic per se.
    3. The problem "replace all A-s with B-s" is typically solved using one or another GoF creation patterns, like <a href="http://en.wikipedia.org/wiki/Abstract_factory_pattern">Abstract Factory</a> or <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Method</a>. You may use them with custom class loader, if you really want to
    By the way, all UI controls in WD are created using Abstract Factory (role played by view). So you may use this as good example.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Question about required workshop classes for OCP

    Im working on finishing up my OCP in a few months. Quick question about the workshop class. Is there a test at the end of the week?
    Also how do most people pay for these classes? They are pretty steep and my company doesnt pay for stuff like this for me. Im paying totally out of my own pocket. Also why is the online class the same amount as the instructor lead class? Its not like im in a room at some building that Oracle has to lease for use or something.

    RedDeuce wrote:
    Im working on finishing up my OCP in a few months.What Certificate exactly are you working towards?
    Also how do most people pay for these classes? They are pretty steep and my company doesnt pay for stuff like this for me. Im paying totally out of my own pocket.Then talk to your employer again or maybe look for other jobs that support your plan better.
    Also why is the online class the same amount as the instructor lead class? Its not like im in a room at some building that Oracle has to lease for use or something.They know that you might save on expenses for travel and hotel etc.

  • Yet another question about super raid - GS70

    Yes, another question about Super Raid...I recently picked up the cheapest model of the GS70 on newegg which comes with 1 mSata SSD...just a mediocre one if I remember reading correctly.  I'm interested in using MSI's Super Raid once my warranty is over with and have been reading a couple posts here:
    1. Walk through of how to reinstall OS
    --> https://forum-en.msi.com/index.php?topic=167198.msg1224063#msg1224063
    2. I'll need a Super Raid card with links to get some, for about $100 each
    --> https://forum-en.msi.com/index.php?topic=171722.msg1252847#msg1252847
    3. I can't get Super Raid unless it originally came with it?
    --> https://forum-en.msi.com/index.php?topic=171185.msg1249640#msg1249640
    So what's the bottom line? Would I still be able to enable super raid in the future or am I SOL since it didn't come with it originally?
    thanks!

    The GT70 CAN come with an adapter that has 2 (on the older, GT70 0NX models) or 3 (on newer GT70 20X models) sockets for mSATA drives. It's an optional part, that takes place of the primary SATA drive in the notebook, and physically has a different part that connects to the motherboard. If it doesn't come with the SuperRaid adapter, then it just has support for a single 2.5" SATA drive.
    The GS70 on the otherhand, has this built into the motherboard and there is no swapping it out for a normal 2.5" SATA drive. You can only use mSATA drives (on those ports). The GS70 is meant to be an ultrabook, and therefore does not have the same ability as the GT70 to house up to 2 full size 2.5" SATA drives.
    That's really the main difference here. Without physically seeing a GT70 to see how the SuperRaid adapter works, it's slightly difficult to explain.
    But in the end, I wouldn't worry about the SuperRaid....The GS70 should have support for Intel Raid Management Engine, in which case that's all you really need.

  • Few questions about Calendar / SimpleDateFormat classes

    Hi.
    I have few questions about Calendar class:
    1. How can I get only date representation (without the time)?
    after doing:
    Calendar cal = Calendar.getInstance();
    I tried to clear unecessary fields:
    cal.clear(Calendar.SECOND);
    cal.clear(Calendar.MINUTE);
    cal.clear(Calendar.HOUR_OF_DAY);
    But after printing the time, it seems that the HOUR was not cleared:
    SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    System.out.println(sdf1.format(cal.getTime()));
    ---> 03/11/2004 17:00:00
    Am I missing somthing?
    2. I want to make sure that two different formats couldn't be compared. i.e., if I'll try to parse one String according to different format -- ParseException will be thrown.
    String date = "19/04/2004 13:06:10";
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
    Date dateObj = sdf.parse(date);
    However, even though that formats are different, no exception is thrown and the return Date is 19/04/2004 00:00:00.
    How can I cause to exception to be thrown if formats are not identical?
    Thanks in advanced

    The Calendar class has a few of what Microsoft would call 'features'. :^)
    To clear the time, call:
    calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY), 0, 0, 0);
    If you want 'pessimistic' rather than 'optimistic' date parsing, you have two options:
    1) Call calendar.setLenient(false);
    See if that is strict enough for your needs, otherwise:
    2) Write code to ensure a stricter parsing of the string passed in. For example, you could very simply check the length of the string to determine if time data is also present.
    When parsing, a string like '02/29/02' would parse to the date '03/01/02'. Setting lenient to false may fix this, but the surest way is to do some testing and then make the parsing more pessimistic where it suits your needs.
    - Saish
    "My karma ran over your dogma." - Anon

  • Question about using container class - Map

    hi all
    i have a question about the following :
    i have two sets of data, both use a common filed as key for the map:
    A = {a,b,d,f,g,h} and B = {a,d,e,g,i,k}, each key has a value associated with.
    i need to find out the commonality, and the difference - i.e fields are in map A but not in Map B, and some fields that are in B but not in A. is there any quick method that comes with the collection class that can calculate this? thanks

    yes, the keyset will be used to access values.
    so, SetA.retainAll(SetB) will modify the SetA so that it contains keys that are in both SetA and SetB - the intersection.
    and SetA.removeAll(SetB) will modify the SetA so that it only contains keys that are in SetA, but not in SetB?
    correct?

  • Some question about SUP 2.0 workflows.

    Hi experts.
    I'm trying to learn about SUP 2.0 workflows. I'have tested some examples but I continue having unresolved questions.
    we assume that I have a cliente-started application workflow. It has a MBO created with a BAPI which returns SAP customers. I have implemented it with a daily cache-refresh at 23:00.
    1º-  I suposse that everydays after 23:00 , new customers created in SAP r3 are automatilly download to my device? is this corrrect?. A part of this, if  I need to see new customers until that time, for example, How can I obtain them? make a button which run a onliquest and have a MBO ondemand cache-refresh? or online request  only obtain datas from my simulator database?
    In resume: How to forze to download new datas from SAP r3 to my device? workflows Application does not have a button to syncronize like SAP netweaver application.  onlinerequest + ondemand cache refresh is the same to syncronizate?
    2º About DCN. I have a basic server-intiated application. we assume that I have running two simulator : A and B.
    If I send a notification across workflow editor, I can type who device is going to receive the notification but Iif I need to send the notification across a http request, which field I need to fill to indicate the receiver?? In field "TO" , i type SUPAdmin but if i type the name for the device ( simulatorA), it does not work.
    Thanks very much.
    Edited by: vclement on Aug 18, 2011 12:15 PM
    Edited by: vclement on Aug 18, 2011 12:39 PM
    Edited by: vclement on Aug 18, 2011 1:23 PM

    Maybe I can help you.
    When you create the MBO, there is a Cached Group that your MBO will belongs. {Remeber that Cached Group will only appear when you switch to Advanced Developer Setting}
    IF you try to create another Cached group you have some options like:
    On Demand,
    Schedule,
    DCN and Online.
    Using the schedule you will setting the MBO make the sync in the time that you set.
    Check out this PDF: Developer Guide for Mobile Workflow Packages - Sybase Unwired Platform 2.0
    Regards,
    Fernando.

  • Maybe a dumb question, about which power connectors to use, but....

    This may sound like an incredibly dumb question, but here goes anyway....
    I upgraded my system a few weeks ago, and will be slapping in a new ATI X850 Pro AGP card in a few days.  My current graphics card is a p.o.s. Radeon 9550, so it doesn't have its own power connector or even a fan.  My PSU is a dual-rail Antec model, and I'm wondering if it should matter any about how many or which devices I have connected to each power cable set.  My psu came with cables to attach, only 2 of the 4 though are the 4-pin molex - the other 2 are pci-e power connectors I believe.  Should it make a difference which or how many devices I connect to each cable?  For ease of plugging in, I believe my DVDRW and CDRom are using 1 cable, and my ide drive and floppy are using the other cable. Also, I have a pci fan and a case fan running off 1 or the other.  I'm likely to jump the power cable for the video card off the one the hard drive is using, unless someone has some suggestion to offer to the contrary.
    If it makes a difference, can anyone recommend how they would have them connect?
    My list of devices to plug in would be:
    1)IDE HDD
    2)Floppy
    3)CDRom
    4)DVDRW
    5)Case Fan
    6)PCI Fan
    7)Video Card
    Thanks for any thoughts!  SAB - you seem to be the man on builds.....any ideas? 

    Well, I put the new card in and connected it on a cable with the optical drives.  Also, I had unwittingly connected my cdrom on the same ide channel as my hdd    , so I changed that so both optical drives are on the secondary ide.
    So far, so good.  3dMark03 jumped up from 3300 with an overclocked Radeon 9550 to 10570 with the stock Radeon 850 Pro 
    I wish I could find some local source to purchase additional molex cords for my Antec SmartPower 2.0 psu, though - I've got 2 more 'outlets' just sitting there on the psu doing nothing, because the other cables are for pci-e, and I'm not using pci-e......  If I could buy some additional molex cables to plug in like the ones that came with it, I could have the vid card on its own cable....

  • A dumb question about wifi...

    I'm not as 'literate' as some are when it comes to computer technology...but here is the question...If I walk into a place that has wifi and my iphone is set with wifi ON, how will I know if there is a charge for using the wifi? Will my iphone automatically kick into the wifi or will there appear an invitation to pay a fee to connect...and how do you pay and do you have to have a password and if so, how do you get that? I know....dumb question...Thanks.

    Not a dumb question at all.
    First of all, set your iPhone up like this:
    1) Go to Settings on the main screen (looks like gears)
    2) Click on "Wi-Fi" (second option from the top)
    3) At the bottom of this page (Which should say "Wi-Fi Networks" at the top) turn "Ask to Join Networks" to the "ON" position.
    Now when you walk into a place that has Wi-Fi, your iPhone will display a little window that asks you whether you want to join the network or not.
    In some places, you may even see a list of more than one Wi-Fi network to join. This is quite common in New York City. The reason is because so many people have Wi-Fi in there apartments, and they all live so close together, that sometime your iPhone can detect multiple networks. The coffee shop near my apartment has their own network, but I can also connect to the Wi-Fi network in my apartment because I only live about 50 feet away.
    Anyway, when you see the list of Networks to join, you may notice a little padlock symbol next to some of them. This means these are closed networks that require a password to connect to. (My network is "Closed", ie requires a password so that everyone in the coffee shop next door doesn't use my internet).
    Networks that DO NOT have the little lock symbol are "Open" which means you can join them without a password. But there is a catch... A lot of coffee shops have open networks, but as soon as you try to browse the web, they redirect your browser to their own page, no matter what web address you enter. Basically, they are letting you connect to their network without a password, but not letting you browse the internet without giving them some money.
    So (as the previous poster said) the page that the coffee shops redirects you to, usually has instructions, and of course a place to put in a credit card. Once you do all that, then you can browse the internet without getting redirected to their little payment page. Its sort of confusing because you don't need a password to connect to their "open" network, but you do need one to browse any web pages. How you get the password differs from coffee shop to coffee shop, but usually they give it to you right inside your web browser once you give them your credit card number.
    T-Mobile provides wireless for Starbucks (at least in a lot of places they do). So once you have an account with t-mobile, you can use it in any starbucks or "T-mobile hotspot"
    Now this all sounds kind of complicated, but more and more these days, you can just walk into a place, find an open network (one without a lock next to it) and start browsing without being redirected or dealing with credit cards. Basically these places are providing free internet to try to attract customers.
    Good luck
    P.S. Wi-Fi eats up battery life. If you aren't going to be using it to browse web pages, you can go into settings, then Wi-Fi, and turn Wi-Fi off. This will save you battery life, but you have to remember to turn it back on. Even without Wi-Fi on, you can still browse the internet if you see a little "E" at the top of your screen. The E stands for the AT&Ts Edge network, which isn't as fast as Wi-Fi, but covers pretty much everywhere that your phone can get a signal.
    Message was edited by: erik graham

  • Dumb Question about multiple BSSIDs

    This is probably a dumb question, but enquiring minds want to know...
    When using Yosemite's built-in Wireless Diagnostics scan I see many unique WiFi BSSIDs (MAC addresses) associated with my Time Capsule: 5 for my Guest Network and 6 for my "main" network. I see that not all have the same 802.11 protocol, but not all have unique 802.11 protocols. Also I see my "main" network is the 802.11ac network.
    So my questions are:
    - Why are there so many different BSSIDs and how should I interpret them?
    - Which of these BSSIDs are "relevant" that I should pay attention to?
    Thanks,
    Kevin

    Why are there so many different BSSIDs and how should I interpret them?
    The 5 GHz band on the main network is one unique BSSID
    The 2.4 GHz band on the main network is one unique BSSID
    If you have the Guest Network setup......
    The 5 GHz band on the guest network is one unique BSSID
    The 2.4 GHz band on the guest network is one unique BSSID
    If you have multiple AirPort routers, repeat the information above for each router.
    Which of these BSSIDs are "relevant" that I should pay attention to?
    Personally, I pay no attention to this, but some users place great importance on this.
    The BSSID tells you which AirPort.....if you have multiple AirPorts....and which band....2.4 GHz or 5 GHz.....that you are connected to at the current time....as well as whether you are connected to the "main" network, or the "guest" network.....if you have enabled the guest function.

  • Dumb question about browser dectection

    I have a web application that looks awesome in IE but in Firefox it looks clunky and blocky. What I need to perform is a validation to see what browser the client is using. I have done this before on simple html pages javascript browser sniffing. Well it seems that I can't for the life of me to be able to get this working in Creator.
    My web project is a Sun Creator Web application. My OS is Windows
    Does anyone have any idea or references that you could supply to me?
    The following code works in an html environment but in a jsp I cant get the different style sheets to work.
    document.write("<link id="link1" rel="stylesheet" type="text/css" href="/WebDemoExtractor/resources/introductionFireFox.css" /> ");
    U jave tried many variations of the following
    document.write("<ui:link binding='#{introduction.link2}' id='link2' url='/resources/introductionFireFox.css'/>")
    I have tried performing many variations with the the above and I have had no success.
    Is it even possible to perform this function??
    Thank you

    jackiepanpan wrote:
    Not a dumb question at all.
    I think you mean how is it possible to view YouTube videos in Safari on iPad, right?
    Basically, YouTube senses the browser you're using. Because Safari on iPad doesn't support Flash, YouTube delivers the movie in a format the iPad can play (like H.264, as a previous post mentioned). This happens with YouTube videos embedded on other web sites, too.
    I hope this helps.
    I was in an Apple Store a few days ago, and a teenage kid really wanted an iPad. His dad said, "but it doesn't play flash, so you won't get to see YouTube videos that you love." Kid said, something expletive deleted.
    The son then picked up the iPad, and he clicked on the YouTube icon. Walked out of the store with it. Sales guy and I laughed. Made my day.

  • Dumb question about user_sdo_geom_metadata DIMINFO entries

    I'm sure that this is a dumb question!
    I create a new entry in user_sdo_geom_metadata as follows...
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES ( 'PR_A', 'GEOM',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('X',190000.0,640000.0, 0.05),
    MDSYS.SDO_DIM_ELEMENT('Y',120000.0,680000.0, 0.05)
    NULL );
    But when I select the DIMINFO from the table...
    SQL> select diminfo from user_sdo_geom_metadata a where table_name = 'PR_A';
    DIMINFO(SDO_DIMNAME, SDO_LB, SDO_UB, SDO_TOLERANCE)
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', 190000, 640000, 0), SDO_DIM_ELEMENT('Y', 1200
    00, 680000, 0))
    The sdo_dim_element and sdo_tolerance
    elements show no decimal places.
    Is this because I have not set some
    display number format option in SQLPLUS
    or for some other reason?
    regards
    Simon

    Simon,
    If you are using an old sqlplus client
    (815) then you won't be able to see the decimal places in the diminfo object.
    But if you hace a newer (816/817) sqlplus
    client you should be able to see the decimal places.
    If you are not seeing them in these clients
    then there might be some format paramter set
    to show numbers without decimals.
    You can do a
    show numformat
    in sqlplus to see if there is any format set for that paramter.
    null

  • Dumb question about cycling a battery. Sorry!

    I just received by new mac book pro replacement battery today and I have some questions regarding it. First of all, my original battery lasted 2 yrs, 2 mos. I purchased another apple battery for my 15 inch mac book pro (computer originally purch. Aug. 2007). I've seen on these boards that I'm supposed to "cycle" the battery once a week to get the maximum life out of it. I think a cycle means using the battery until it's power is used up and then charge up to 100% again. Is that right? Anyway, my question is, "What is the proper care for this new battery? Does it damage it to have it plugged in when it is fully charged? Or should I always keep it unplugged and use the battery until it runs out and then charge it again? And what does it mean to cycle it once a week, if I'm already using the battery and recharging it when needed?" Sorry if these are dumb questions. I'm not really computer savvy! Thanks.

    You should use the battery for a while every day but not drain it right down, before re-connecting the power and re-charging it to 95%+ this is not a complete cycle but partial/normal cycling.
    _Every couple of months_ you should re-calibrate the battery which means you keep using it until it goes into emergency sleep itself (you will see a warning then 5 minutes later it will go off by itself) and then _leave it in this state for at least 5 hours_ before you re-connect the power supply and fully charge it (without unplugging) - this is a proper re-calibration.

  • SUPER SIMPLE DUMB Question about hard-wired desktop mac and wifi for iPhone

    Sorry if this has been already answered a million times. I have a desktop mac with a cable modem ethernet internet connection. I want to leave this hard-wired and setup a wifi network for a laptop or iPhone. What's the cheapest easiest way to do this?? I've never done anything wireless before.

    Could I just somehow split the feed from the the cable modem or ethernet cable and route part of it into an AirPort express??
    Unfortunately, no. This would create "confusion" for the modem as it is only expecting a single device to be connected to it. To be able to support both wired & wireless clients, you would need an Internet router with a built-in Ethernet switch, like the AirPort Extreme Base Station. If cost is an issue, you do NOT have to use an Apple router. There are a number of other vendors, like Belkin, D-Link, Linksys, & Netgear, to name a few, that offer similar models.

  • Question on Assigning Sub Class References

    Hi Friends,
    I have small doubt regarding Assigning Class Reference to Super Class or Interface.
    List list= new ArrayList(); or Collection collection = new ArrayList();
    Map map=new HashMap();
    if i assing like above i may loose some of the specilized methods of ArrayList,Map etc...
    but most of the people are creating the objects in above fashion.
    can any body list out the advantages.
    Thanks in Advance!

    Agreed, you do lose some of the specialised methods.
    But sometimes its functionality you don't need.
    If your function takes a "Collection" it doesn't matter if its ArrayList or Set - you're just interested in the Collection Interface (common use case would be to obtain an Iterator to the underlying datastructure)
    Writing to the interface means that you can change the implementation at will.
    You can swap an ArrayList for a LinkedList. A HashMap for an LinkedHashMap or TreeMap. And the rest of your code is untouched, because it presumed nothing about the implementation.

Maybe you are looking for