Inheritance in DAOs from a MainDAO???

I'm thinking of making a central dao with code that daos will use to connect
to DB then extending the maindao for the minor daos, so in case I change
something I will not have to waste time on maintence, bad idea?

Adry1 wrote:
Kaj,
Ok, it is clear, thanks. I did not mean Java 5 and static imports, although it really looks like I thought in that direction. But it is interesting to know.Well, your original idea is bad, and especially since you wanted to extend a class just to get some static convenience methods. The static import was added to the language just so people wouldn't do that.
Kaj

Similar Messages

  • I inherited an iMac from my brother-in-law who removed his password and can't remember the temporary one he put in.  How can we unlock the computer?

    I inherited an iMac from my brother-in-law who removed his old password and has forgotten the temporary one he installed.  How can we unlock the computer?

    Resetting or changing a password:
    For Snow Leopard or earlier:  http://support.apple.com/kb/HT1274
    For Lion or later:  http://support.apple.com/kb/HT6022
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email
    If it's running Mac OS X 10.6.8 or earlier, insert a Mac OS X install DVD, restart with the Option key held down, click on it, and use the Reset Password utility.
    If it's running Mac OS X 10.7 or newer, restart with the Command and R keys held down, open the Terminal, and use the resetpassword command:
    https://discussions.apple.com/docs/DOC-4101
    If it the Keychain password that needs resetting:
    http://support.apple.com/kb/ts1544
    If the computer has a firmware password set, contact Apple.

  • Calling one DAO from another DAO

    Ok I am having a problem. But let me first give you the background:
    I have a BaseDAO in which Connection is encapsulated:
    public abstract class BaseDAO {
       private Connection _connection = null;
       public BaseDAO( Connection connection ) {
          this._connection = connection;
       public Connection getConnection() {
          return _connection;
       public void setConnection(Connection connection) {
          this._connection = connection;
    }All my DAOs are inherited from BaseDAO. All of their constructors call BaseDAO's constructor.
    I have a DAO Factory in which Connection is encapsulated:
    public abstract class DAOFactory {
    private Connection _connection = null;     
    public Connection getConnection() {
      return _connection;
    public void setConnection(Connection connection) {
      this._connection = connection;
    }In concrete implementation of DAO Factory I instantiate a DAO by passing the connection. For example :
    public GenericDAO getGenericDAO() {
    GenericDAO genericDAO = new GenericDAOMSSqlServer( getConnection() );
    return genericDAO;
    }In this way I make sure that the same Connection is used by all the DAOs instantiated from a particular DAO Factory.
    In my unit-of-work, I first got DAOFactory, then sets its Connection:
    DAOFactory daoFactory = DAOFactory.getDAOFactory();          
    daoFactory.setConnection( _connection );
    Then I use daoFactory to get DAOs:
    GenericDAO genericDAO = daoFactory.getGenericDAO();
    Everything is working good. Now suppose I have a DAO method getShifts() in ShiftDAO. Inside this method I want to call DAO method getRowsetAdaptor() in GenericDAO. I want to know what is the proper way to do this thing.
    What I think I need in DAO method getShifts() is:
    a) get the DAO Factory which is used to instantiate ShiftDAO (this way I will get the same Connection)
    b) use that DAO Factory to instantiate GenericDAO
    c) use the method getRowsetAdaptor() of GenericDAO
    d) continue processing getShifts()
    What do you guys think?

    Hi,
    I want to call DAO method getRowsetAdaptor() in GenericDAO. I want to know what is the proper way to do this thing.
    What I think I need in DAO method getShifts() is:
    a) get the DAO Factory which is used to instantiate ShiftDAO (this way I will get the same Connection)
    This seems to imply that a different DAOFactory was used to create ShiftDAO. If so, how would it know how to create a GenericDAO. And if it does why have 2 DAOFactories.
    b) use that DAO Factory to instantiate GenericDAO
    see a
    c) use the method getRowsetAdaptor() of GenericDAO
    If this method is needed by both GenericDAO and ShiftDAO, then it belongs in BaseDAO and not GenericDAO. In the case that this is not possible, then both ShiftDAO and GenericDAO need to implement it or call a utility call that implements the method.
    d) continue processing getShifts()
    see c
    Hope this helps.
    Cheers,
    vidyut

  • HT201441 Inherited an ipad from a friend passing away and cant clear it to use as i dont have her itunes password to reset.

    I inherited an ipad 2 from a friend that had passed away. I went to go and use and discovered that no one knew her password for her itunes account. Which poses a problem as i cannot wipe the ipad without it.

    I cannot find "Other" devices. I found Apple Mobile Device under Universal Bus Controllers but cannot see "recovery mode" or any other status. I use Windows Vista.
    When I try to restart Apple Mobile Device Service I get the following message: "The Apple Mobile Device Service on Local Computer started then stopped. Some services stop automatically if they are not in use by other services or programs". What does this mean?
    During the last 48 hours I was able to see my iPad in iTunes only one time during many attemnpts to connect . I haven't been able to see it during the llast several attempts.
    Any suggestions? The standard suggestions have not worked: i.e. stop then start AMDS; tuurn off iPad and PC, then restart both and reconfrom iPad to PC; reload iTunes.

  • Windows Server 2012 R2 robocopy not copying inherited directory permission from source file server to destination ?

    Can anyone here please help me with Robocopy on Windows Server 2012 R2 to copy the file server content from \\OldFileServer\Data share into the local S:\Data drive ?
    here's my script that I use to copy 11 TB of file server contents:
    robocopy.exe "\\OLDFILESERVER\Data" S:\Data *.* /E /SECFIX /SEC /XO /ZB /COPYALL /MIR /DCOPY:DAT /R:0 /W:0 /NP /NFL /NDL /TEE /LOG:"G:\robocopy.log"
    Any kind of help and assistance would be greatly appreciated.
    Thanks
    /* Server Support Specialist */

    Hi,
    Based on my tests, inherited permissions will not be copied using robocopy.exe.
    That’s because that after we copy or move an objects to another volume, the object inherits the permissions of its new parent folder.
    My suggestion for you is to disable the inheritance on corresponding subfolders, and Convert inherited permissions into explicit permissions on this object. After that, those permissions can be copied.
    Here are some references below for you:
    Robocopy not copying NTFS permissions
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/b36748cd-14d1-47a5-9fb6-878ca93ad6fc/robocopy-not-copying-ntfs-permissions
    How permissions are handled when you copy and move files and folders
    http://support.microsoft.com/kb/310316
    Powershell ACL commands? NTFS Permissions - Turn inherited permissions into explicit permissions and remove inheritance
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/884e2837-ec1d-4937-83a5-722cd00d7d16/powershell-acl-commands-ntfs-permissions-turn-inherited-permissions-into-explicit-permissions-and?forum=ITCG
    Best Regards,
    Amy

  • Child pages inheriting editable regions from template

    I have looked far and wide and cannot find an answer to this problem:
    We recently did a homepage update where the nested and/or second level template (index_template.dwt) was changed. Since much of the formatting was the same - I duplicated the original index_template and made all necessary changes. From this template two child pages were created for our US and UK site. Upon creating the page(s) from the index_template they are inheriting the editable regions, thus not having the ability to update when changes are being made to the template. I have tried multiple ways in an attempt to correct this - but to no avail. Does anyone have a clue how to correct this? As of now I have to manually update all 3 pages.
    BTW I am also a relatively new user who was thrown into managing our company website and pretty much doing a redo on the whole thing. Talk about a learning experience!

    My issue is when you create a page from a template they are not supposed to inherit the editable regions less otherwise marked.
    But that is not true. A newly created child page will inherit ALL content from its template.  But changes to the editable region contents in the template will NOT propagate to existing child pages.
    So, for example, if I want all child pages to have an embedded stylesheet in the head that is EDITABLE, my template would look like this -
    <!-- TemplateBeginEditable name="head" -->
    <style type="text/css">
    </style>
    <!-- TemplateEndEditable -->
    All newly created child pages will then look like this -
    <!-- InstanceBeginEditable name="head" -->
    <style type="text/css">
    </style>
    <!-- InstanceEndEditable -->
    If I then go back to the template and change it like this -
    <!-- TemplateBeginEditable name="head" -->
    <style type="text/css">
    body { margin:0; }
    </style>
    <!-- TemplateEndEditable -->
    that change will NOT propagate to existing child pages, but WILL appear in child pages created subsequently to the save of the template after the change.
    And by the way, it's always been this way.

  • Inheriting Project Roles from another project

    Hello all,
    I wants to inherit all the project roles from one project to another without actually creating the new roles, and then close the parent project.
    Because i have one business requirement that we need to create a new project with same resources as the parent project and it is too time consuming to create roles, consider the case there are 10-15 resources assigned.
    Is there is any way to do it ?

    Hi Rahul,
    You can create generic  project template in which you can create the WBS and create the roles as well as you can assign business partner to roles .
    use the template while creating the project all the role from the template will be inherited.
    Regards
    shiv

  • Inheriting Sales area from header to ITem

    Hello All,
    is there a way to inherit header sales area to Item sales area pelase?
    I read SAP documentation that explains that if you leave ORg Determination profile as EMpty for item catogory, it inherits from header to item.
    But system does not do it for the division.
    if i leave it empty, only Sales org and Distribution channnel get inherited but not division. divison is allways coming from material.
    is there anyway to change this and get Sales area determining always from header of the document pelase?
    BR,
    KP.

    Hi npl kpl,
    Division will always come from product. That is standard behavior. If you read the IMG activity description for 'Assign Organizational Data Profile to the Item Category' , it is clearly stated that division will get derived from product.
    Now if you must change it, I think you will have to write custom code in some BAdi after the org determination has happened for your item.
    Regards,
    Niraj

  • How to generate DAO from Entities in OEPE

    Hi All,
    I'm using oracle enterprise pack for Eclipse(OEPE). I developed JPA project for that i created Entities from Tables now i want to develop a DAO(Data Access Objects) from Entities
    but i'm not getting any plug-in fro that to generate DAOs or any Option in OEPE.why i need DAOs is from that DAOs i need to expose an web services.
    please any one show how to generate a DAOs in OEPE or where i need to instal ant plug-in for that generation.
    please give any resolution.
    Thanks & Regards
    Shankar

    Hi Carlin,
    Thanks a lot .
    I downloaded that latest version. I'm able to generate DAO's(stateless session beans) fine ,but while exposing them as a web service I'm getting this error IWAB0014E Unexpected exception occurred. in pop, that pop details following errors I'm getting
    IWAB0014E Unexpected exception occurred.
    java.lang.NullPointerException
    at org.eclipse.jst.ws.internal.consumption.ui.common.FacetOperationDelegate.addFacetsToProject(FacetOperationDelegate.java:75)
    at org.eclipse.jst.ws.internal.consumption.common.FacetUtils.addFacetsToProject(FacetUtils.java:777)
    at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.execute(CreateFacetedProjectCommand.java:190)
    at org.eclipse.jst.ws.internal.creation.ui.extension.PreServiceDevelopCommand.execute(PreServiceDevelopCommand.java:197)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1029)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
    at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
    at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:262)
    at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:382)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    I'm using OEPE 11gR1 (11.1.1.8) and server oracle web logic server 11gR1(10.3.4) version.
    while exposing WS configurations as fallowing like
    Server Run time :oracle web logic server 11gR1(10.3.4)
    Web Service runtime:Apache Axis
    services project:samplejpsws
    services EAR project:samplewsEAR
    for this while exposing WS i'm getting above Errors
    can you please tel how to Expose WS and that are the run times requires
    Thanks
    Shankar

  • How do you restore on a Mac? I want out of Mavericks, as it's slowed me way down. I inherited this mac from my predecessor. Help!

    I recently updated to Mavericks (March 27th).  I inherited this Mac when I took my position.  I've had to teach myself how to use it and make the decision to update.  I am sorry now as it's slower than slow and I'd like to restore to a back up in the Time Machine.  I find Apple Support difficult to manuever to discover how to do most anything. 

    Activity Monitor - Mavericks
    Activity Monitor in Mavericks has significant changes
    Performance Guide
    Why is my computer slow
    Why your Mac runs slower than it should
    Slow Mac After Mavericks
    Things you can do to resolve slowdowns  see post by Kappy

  • Essbase 11.1.2.1 Users not inheriting filter access from group

    Hello all! We installed Essbase 11.1.2.1 in a distributed environment integrated with Shared Services and ran into an issue when provisioning users via groups. Using Shared Services we created a Native Directory Group and User. We provisioned the group with the Server Access Role and Filter Application role, then assigned the filter to the group using 'assign access control' on the application in Shared Services. For some reason using the Essbase add-in we are unable to retrieve data from the database. We receive an error stating the user id does not have read access to the db. If we carry out the same provisioning steps above on the user directly, we are able to retrieve data from the database. Any ideas on what might be causing this?

    In V11.1.2.2 ESSBASE is managed by OPMN. OPMN needs to be started before starting ESSBASE. You need to use "start.sh". Please do the following
    1) Run "stop.sh" that is in the starter scripts folder - This will stop all Oracle EPM components that are installed on the box
    2) Run "start.sh" - this will start OPMN, ESSBASE and all other installed components
    The "startEssbase.sh" and "stopEssbase.sh" can be used to start or stop ESSBASE only when OPMN is already running.

  • I have inherited a Macbook from an ex-colleague and all his files are locked.  I need to free up spaced

    I need to remove files from a Macbook.  Some of them are in locked folders.  Some will simply not transfer to Trash.  Some give a message about not finding an alias.
    I am new to Macs and haven't a clue where to start.

    Finstall wrote:
    I need to remove files from a Macbook.  Some of them are in locked folders.  Some will simply not transfer to Trash.  Some give a message about not finding an alias.
    I am new to Macs and haven't a clue where to start.
    Start here: MacOS, as a Unix based system, follow the concept of 'users' and 'permissions' (not legally, technical terms). Unlike a TV or car, you can not simply switch-on device - you have to permit before 'enter'.
    A Mac is able to handle dozens of diff. users - but each user has diff. and own permissions. and only each user (or the 'super user', the admin) can change 'his/her' permissions, to files, to folders, to programs, to whole system.
    so, if the ex-owner doesn't set YOU as the new admin on this Mac, only solution - and btw best practice - is to format the whole drive and re-install OS and programs from original installer disks.
    do you have the disks? one or two grey 'dvds' ... ?

  • Invoking DAO from session bean

    Hi,
    I have a session bean method "method1" that invokes a DAO method which reads/write to DB2 database table. Will the DAO's db interaction will be part of the transaction initiated by container which is defined at the session bean's method ?
    If yes, then will the transaction manager put a lock on the db record till the excution of the method is completed(transaction has a method scope), though the db read(DAO invocation) is at the beginning of the method ?

    Thanks for your reply. But why do you feel that the container is not responsible for putting the lock as we set the transaction isolation level setting at the method level ?
    The following problem led me to post my original question :
    I have an application which used to run on WAS 5.0 and DB2 ver 7 patch 6 . I put a patch 10a for the DB2 drivers. After that I am getting problem executing a particular scenario. The scenario is - I have a stateless session bean method which updates a db record by invoking the an entity bean (CMP) and then accesses the same record through a DAO. But the read fails as the db record is locked. The session bean method has a transaction attribute "TX_REQUIRED". As both the db operations are part of the same transaction, I fail to understand why there should be lock on db record for the second operation ?
    Do you have any clue ?

  • JWS not Inheriting PROXY settings from Netscape

    Hi!
    We are using JWS 1.0.1_01 to launch our application, which needs the proxy settings of the user to connect via SSL to our servers.
    We do not have any problems when the user does not use proxies to access the Internet or uses Internet Explorer as their default browser.
    For users with Netscape 4.* as their default browsers, many users are not able to launch our application, as it can not find the proxy settings.
    They can not download the sample applications of Java Web Start either.
    They work fine if they make Internet Explore as their default browser or set the proxy manually in Java Web Start.
    As our customers use some sort of scripts for proxy configurations we do not want to set the proxy manually in Java Web Start.
    We want to use the proxy settings of the browser.
    So I want to know if there is a known issue with Java Web Start not detecting the proxies automatically from Netscape.
    Any help appreciated.
    Thanks
    -Nawaz

    Basically web start can only pick up the settings of whatever
    happens to be the current Windows default browser. If that's Netscape then the Netscape settings will be used.
    Since your clients are using a script to specify the proxy settings you should also be aware that there's an issue with web start 1.0_01 where it locates the proxy setting based on the first occurrence of the word "Proxy" in that script. This can cause issues if the first proxy
    listed is for https only of even if the first occurrence of "proxy" is
    inside a comment.

  • Laptops with inherited defected GPUs from nvidia

    I come across this website while googling about nvidia faulty cards
    http://www.nvidiadefect.com/
    by reading few links, one can imagine almost every  nvidia chip supplied is defective:
    http://www.nvidiadefect.com/evidence-with-links-to-external-sites-t10.html
    so guys if you are having trouble with a laptop with nvidia chip above website worth to check.
    unfortunatly bought lenovo laptop with defected GPU and I have started process to get refund or repair from retailer who sold me the product with defected chip.
    I sent them email explaining them the situtation. they agree to look into the matter and asked me to send 'Engineers report'. it means they didnt plainly refused.--"Sorry we cant do anything cos your laptop is out of warranty" ! popular phrase!
    best wishes
    Note from Moderator:  A comment which violated the forum rules was removed.

    MSI is doing great to deliver all the gears with new NV GPU to the market. Even the review by the media is so quick response.
    Wondering what's the brilliant news coming next?
    - - - Updated - - -

Maybe you are looking for