Search Results

Search found 4035 results on 162 pages for 'extends'.

Page 1/162 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Hibernate Transient Extends problem

    - by mrvreddy
    @MappedSuperclass public abstract class BaseAbstract implements Serializable{ private static final long serialVersionUID = 1L; protected String test = //some random value; public String getTest() { return test; } public void setTest(String test){ this.test = test; } } @Entity public class Artist extends BaseAbstract { private static final long serialVersionUID = 1L; private Integer id; @override @Transient public String getTest() { return test; } ..... } My question is... when i am trying to do any operation on the artist, along with id and name, test is also getting saved which should not be the case... if i add the same transient on the baseabstract class getTest() method, i see test column NOT getting created(ideally what it should happen) but if i try to override the method with adding annotaion in the sub class it creates the test column... I dont know why this is happening since when hibernate is creating the artist object and checks for annotations, it should see the transient annotation present on the getTest() of artist method...and should not create a column in the database... Let me know if you need any clarification.... Any response on this is greatly appreciated.... Thank you

    Read the article

  • Dont understand the concept of extends in URL.openConnection() in JAVA

    - by user1722361
    Hi I am trying to learn JAVA deeply and so I am digging into the JDK source code in the following lines: URL url = new URL("http://www.google.com"); URLConnection tmpConn = url.openConnection(); I attached the source code and set the breakpoint at the second line and stepped into the code. I can see the code flow is: URL.openConnection() - sun.net.www.protocol.http.Handler.openConnection() I have two questions about this First In URL.openConnection() the code is: public URLConnection openConnection() throws java.io.IOException { return handler.openConnection(this); } handler is an object of URLStreamHandler, define as blow transient URLStreamHandler handler; But URLStreamHandler is a abstract class and method openConnection() is not implement in it so when handler calls this method, it should go to find a subclass who implement this method, right? But there are a lot classes who implement this methods in sun.net.www.protocol (like http.Hanlder, ftp.Handler ) How should the code know which "openConnection" method it should call? In this example, this handler.openConnection() will go into http.Handler and it is correct. (if I set the url as ftp://www.google.com, it will go into ftp.Handler) I cannot understand the mechanism. second. I have attached the source code so I can step into the JDK and see the variables but for many classes like sun.net.www.protocol.http.Handler, there are not source code in src.zip. I googled this class and there is source code online I can get but why they did not put it (and many other classes) in the src.zip? Where can I find a comprehensive version of source code? Thanks!

    Read the article

  • Generics : List<? extends Animal> is same as List<Animal>?

    - by peakit
    Hi, I am just trying to understand the extends keyword in Java Generics. List<? extends Animal> means we can stuff any object in the List which IS A Animal then won't the following also mean the same thing: List<Animal> Can someone help me know the difference between the above two? To me extends just sound redundant here. Thanks!

    Read the article

  • Why avoid Java Inheritance "Extends"

    - by newbie
    Good day! Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object using the keyword "extends", and at the same time make our code Object Oriented? Could someone please give an Object Oriented example illustrating this concept in a scenario like "ordering a book in a bookstore?" Thank you in advance.

    Read the article

  • What Extends JComponent?

    - by Geertjan
    Let NetBeans IDE tell you what extends JComponent: Thanks to Damian from Gdansk in Poland who left a comment in this blog yesterday that explains how to achieve the above: "Let's say you would like to find all implementations of TreeModel interface. I found today an answer: r-click on class/interface -> chose Navigate->Inspect Hierarchy->select second filter at the bottom of opened window or press Alt+Shift+F12 and then Alt+B." In the list above, double-click an item to open it in the NetBeans Java editor. Handy tip, dziekuje bardzo, Damian.

    Read the article

  • Java Extends value not updating

    - by James116
    I am currently working on a hibernate project(EJB and JSF), and i have multiple java classes. The data of parent is being change in the front end with JSF, however, it is not updating in the child class. Any idea as to what could be causing this? This is what i was doing. public class parent{ private String x = "UNKNOWN"; //Getters and setters public getX(){ } } public class child extends parent{ public string y{ //this is return UNKNOWN //instead of the new value being change by the user System.out.print(getX()); } } Thanks in advance

    Read the article

  • PHP: Class extends problem "Call to private method ... from context ..."

    - by sombe
    I have 3 classes in WordPress (the question itself is unrelated to it): class WP_Widget class Theme_Widget extends WP_Widget class Specific_Widget extends Theme_Widget Essentially Theme_Widget contains some extension functions to the basic WP_Widget. Inside Specific_Widget I call one of Theme_Widget's methods: class Specific_Widget { function __construct() { $this->some_method_that_belongs_to_Theme_Widget(); } } When I instantiate Specific_Widget, PHP throws a fatal error as follows: Fatal error: Call to private method Theme_Widget::some_method_that_belongs_to_Theme_Widget() from context 'Specific_Widget' in ... Do you have an idea as to how I can resolve this? This is the first time I've received this error from PHP. Could it be derive from WordPress itself?

    Read the article

  • Java extends classes - Share the extended class fields within the super class.

    - by Bastan
    Straight to the point... I have a class public class P_Gen{ protected String s; protected Object oP_Gen; public P_Gen(String str){ s = str; oP_Gen = new Myclass(this); } } Extended class: public class P extends P_Gen{ protected Object oP; public P(String str){ oP = new aClass(str); super(str); } } MyClass: public class MyClass{ protected Object oMC; public MyClass(P extendedObject){ oMc = oP.getSomething(); } } I came to realize that MyClass can only be instantiated with (P_Gen thisObject) as opposed to (P extendedObject). The situation is that I have code generated a bunch of classes like P_Gen. For each of them I have generated a class P which would contains my P specific custom methods and fields. When I'll regenerate my code in the future, P would not be overwritten as P_Gen would. ** So what happened in my case???!!!... I realized that MyClass would beneficiate from the info stored in P in addition to only P_Gen. Would that possible? I know it's not JAVA "realistic" since another class that extends P_Gen might not have the same fields... BY DESIGN, P_Gen will not be extended by anything but P.... And that's where it kinda make sens. :-) at least in other programming language ;-) In other programming language, it seems like P_Gen.this === P.this, in other word, "this" becomes a combination of P and P_Gen. Is there a way to achieve this knowing that P_Gen won't be extended by anything than P?

    Read the article

  • Oracle Extends Life Sciences Edition in New Release

    - by charles.knapp
    By Chris Kanaracus, IDG News Service Oracle (ORCL) announced the 17th version of its on-demand CRM (customer relationship management) application Wednesday and made a fresh push into pharmaceutical sales with a Life Sciences edition of the software. New features in CRM on Demand Release 17 include tools for managing sales pipelines and performing forecasts of future business; a redesigned user interface; and added language support. But one CRM industry observer flagged the Life Sciences product as a particular point of interest. Read the full article here.

    Read the article

  • Dirt Cheap Bi-Directional Antenna Wirelessly Extends Your LAN

    - by Jason Fitzpatrick
    If you’re looking for an effective way to link remote LANs without the hassle of laying cable, this DIY bi-directional antenna is a quick (and cheap) method for bringing internet access to outbuildings and other locations. Tinker Danilo Larizza needed to share internet access between apartments that are relatively close together but not hardwired–ruling out simply sharing the access via existing LAN infrastructure. His solution combines a simple scrap wire antenna array mounted inside a plastic food bin (seen here with the cover removed to show the antenna) and some coaxial cable to link the antenna to two routers. Our favorite part about his build is that he constructed the pair to establish if the antenna setup would even work in his location and intended to buy commercial antennas if it did; his Tupperware models worked so well, however, they’re now the permanent solution. Hit up the link below for more information about the project. 2.4 Ghz Directive Biquad Antenna [via Hack A Day] How To Use USB Drives With the Nexus 7 and Other Android Devices Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It

    Read the article

  • IBM Extends Autonomic Chops with New DB2

    Seeking to pry market share from rivals Microsoft and Oracle, IBM Thursday launched a new version of its database software that bundles more of the autonomic capabilities the Armonk, N.Y. firm has been touting as a differentiator from the competition.

    Read the article

  • EBS 11.5.10 Support Exception / 12.1 Extends to Dec 2018

    - by cwarticki
    E-Business Suite 11.5.10 Sustaining Support Exception & 12.1 Extended Support Now to Dec. 2018 [ID 1495337.1] As part of Oracle’s continued commitment to our customers, we will be providing an exception for the first 13 months of Sustaining Support on Oracle E-Business Suite Release 11.5.10 (11i10), valid from December 1, 2013 – December 31, 2014. This exception support will be comprised of three components: (1) new fixes for Severity 1 production issues, (2) United States Form 1099 2013 year-end updates, and (3) payroll regulatory updates for the United States, Canada, United Kingdom, and Australia for fiscal years ending in 2014.  In addition, the Extended Support period for E-Business Suite Release 12.1 has been extended through December, 2018. Customers with an active Oracle Premier Support for Software contract will automatically be entitled to Extended Support deliverables for E-Business Suite 12.1. Please refer to the Lifetime Support section of oracle.com for further information regarding Oracle's Lifetime Support Policy for Applications. This change will be reflected in the October update to the Software Technical Support Policies.

    Read the article

  • Correct usage of "<T extends SuperClass>"

    - by yusaku
    I am not familiar with "Generics". Is it a correct use of "<T extends SuperClass>" ? And do you agree that the codes after using generics are better? Before using Generics ================================================= public abstract class SuperSample { public void getSomething(boolean isProcessA) { doProcessX(); if(isProcessA){ doProcessY(new SubASample()); }else{ doProcessY(new SubBSample()); } } protected abstract void doProcessX(); protected void doProcessY(SubASample subASample) { // Nothing to do } protected void doProcessY(SubBSample subBSample) { // Nothing to do } } public class SubASample extends SuperSample { @Override protected void doProcessX() { System.out.println("doProcessX in SubASample"); } @Override protected void doProcessY(SubASample subASample) { System.out.println("doProcessY in SubASample"); } } public class Sample { public static void main(String[] args) { SubASample subASample = new SubASample(); subASample.getSomething(true); } } After using Generics ================================================= public abstract class SuperSample { public void getSomething(boolean isProcessA) { doProcessX(); if(isProcessA){ doProcessY(new SubASample()); }else{ doProcessY(new SubBSample()); } } protected abstract void doProcessX(); protected abstract <T extends SuperSample> void doProcessY(T subSample); } public class SubASample extends SuperSample { @Override protected void doProcessX() { System.out.println("doProcessX in SubASample"); } @Override protected <T extends SuperSample> void doProcessY(T subSample) { System.out.println("doProcessY in SubASample"); } } public class Sample { public static void main(String[] args) { SubASample subASample = new SubASample(); subASample.getSomething(true); } }

    Read the article

  • LDAP encrypt attribute that extends userpassword

    - by Foezjie
    In my current LDAP schema I have an objectclass (let's call it group) that has 2 attributes that extend userpassword. Like this: attributeType ( groupAttributes:12 NAME 'groupPassword1' SUP userPassword SINGLE-VALUE ) attributeType ( groupAttributes:13 NAME 'groupPassword2' SUP userPassword SINGLE-VALUE ) group extends organisation so already has a userpassword attribute. If I use that to enter a new group using PHPLDAPAdmin it uses SSHA (by default) and encrypts/hashes the password I entered. But the passwords I entered for groupPassword1 en groupPassword2 don't get encrypted. Is there a way to make it so that those attributes are encrypted too?

    Read the article

  • using spl_autoload_register to load classes that extends to another class

    - by Fred Gustavo
    Well, i got this oop: abstract class TestSystemUtils { abstract public function __run(); /* utils funcs */ } class TestSystem extends TestSystemUtils { protected $body; protected $out; function __construct() { } public function __run() { } } I got a directory with many modules, each module is a class that extends TestSystem but i don't want to include all them modules then in method __run i make a dbconnection get these modules that will be used, but in this point idk the right way to 'include' these files i can use __autoload func but idk if i should call these classes inside the class TestSystem or not, all modules need to use these two variables 'body' and 'out' ... Well what's the right way to do it? someone could help me please. Module classes look like: class mod01 extends TestSystem { } thanks.

    Read the article

  • Why in java enum is declared as Enum<E extends Enum<E>>

    - by atamur
    if language designers were to use simply Enum<E extends Enum> how would that affect the language? The only difference now would be that someone coud write A extends Enum<B> but since it is not allowed in java to extend enums that would be still illegal. I was also thinking about someone supplying jvm a bytecode that defines smth as extending an enum - but generics can't affect that as they all are erased. So what is the whole point of such declaration? Thank you!

    Read the article

  • Android Class which extends Dialog, how to clear TextViews before it is displayed

    - by wuntee
    I have a class that extends android.app.Dialog, the layout is done in an xml file, and the setup (button listeners, etc) is done on the onCreate method. My problem is that whenever the dialog is displayed, then dismissed, and displayed again, the Editable TextViews are still populated with the information that was displayed previously. What is the common way to clear these text fields? Remember - this is a separate class that extends Dialog - so there is no 'onDialogCreate' like Activity has. Or, perhaps I am extending the wrong class? There is just a lot of processing being done, and do not want to have all the code in the main Activity. I would like it to be in a separate Class. I tried to extend AlertDialog, but it does not create the border like Dialog does. Any help would be great. The dialog is shown via the Activity: protected Dialog onCreateDialog(int id) { switch(id){ case DIALOG_NEW_SAFE: return(new NewSafeDialog(this)); default: return(null); } }

    Read the article

  • using extends with Java Generics

    - by Sandro
    Lets say that I have the following code: public class Shelter<A extends Animal, B extends Animal> { List<A> topFloor = new Vector<A>(); List<B> bottomFloor = new Vector<B>(); public A getFirstTopFloorAnimal(){return topFloor.firstElement();} public B getFirstBottomFloorAnimal(){return bottomFloor.firstElement();} //This compiles but when I try to use it, it only returns objects public List<Animal> getAnimals() { Vector a = new Vector(topFloor); a.addAll(bottomFloor); return a; } } Now for somereason the following code compiles. But when I try to use getAnimals() I get a of objects instead of Animal. Any ideas why this is? Does this have to do with the List is NOT a List idea in the Generics tutorial? Thank you.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >