Question for a class

Hey, I'm doing basic flash in a school class right now, and I
have a question...
... there's a "vegetable term" used to describe
following/seeing the motion path an object is taking. Do any of you
know what it is?

Not really being a pest - but I always thought that the
"proper" use of a forum is to search for the
answer forst - so...in theory, anyone asking the same
question that has been asked several times
within the past few days, should really not be awrded with
getting the extra credit, because in
reality, all these duplicate extra credit questions just help
bottleneck the forum's bandwith - an
improper use of any public forum - and, I now realize that I
myself am being hypocritical for
replying and thus adding to the bottleneck myself.
Curseman wrote:
> I'm gonna be honest with you guys. The real assignment
is simply an extra
> credit thing to show that we know how to use a user
support forum, in case we
> ever need one. The vegetable question is just kind of
the example question we
> use.
>
> So thanks for your help, and sorry for being a pest!
>
> I need those points :P
>

Similar Messages

  • Syntax question (for Tween class pros maybe?)

    I've posted it earlier but no one replied. Maybe my post was
    a little confusing. I'll try again.
    Here is the code ( > comboFunc is the problem child):
    var tweenType =
    [_root.tweenOptionsComboBox.selectedItem.data];
    var easeType = [_root.easeOptionsComboBox.selectedItem.data];
    var comboFunc = [tweenType+easeType];
    this.tween = new Tween(this.ring, _xscale,comboFunc, 0,100,5,
    true);
    Basically there are two comboBox dropdown menus on the root.
    Listing all Tween options (Regular, Bounce, Elastic...) and all
    easing options (easeIn, easeOut...) How can put the two dynamically
    together without a long switch statement...
    any insight appreciated.
    Thanks
    Stephan

    Hmm That's so strange. It still doesn't work. I've taken out
    the array notation as you've suggested in your last message.
    The Tracing in the following code:
    var tweenType = _root.growingTween.selectedItem.data;
    var easeType = _root.growingEase.selectedItem.data;
    trace("tweenType : "+tweenType);
    trace("easeType : "+easeType);
    trace("tweenType[easeType] : "+tweenType[easeType]);
    ...prints the following messages in the output window:
    tweenType : mx.transitions.easing.Regular
    easeType : easeIn
    tweenType[easeType] : undefined

  • Some questions for class project? Trying to learn more about the iPhone

    Hey guys, I am looking for some quick feedback on the iPhone and possibly the iPad for a class assignment. If anyone could share information on the following questions that would be fantastic. Thanks!
    1. What are some of the disadvantages of Apple not providing Flash/USB for its products(iPad, iPhone, iPod Touch)?
    2. Why should customers buy an iPad (no USB) rather than the Kindle (USB ports)?
    3. Why do you think Apple doesn't provide Flash/USB ports to its products (iPad, iPhone, iPod Touch)?
    4. Would the lack of USB/Flash in Apple products affect your decisions to purchase Apple products versus a competitor's product?
    5. Do you expect that Apple will begin to incorporate technologies such as USB/Flash in the future as competitor products begin to steal market share?
    6. Apple views Flash as a dying technology. Steve jobs has even compared not supporting Flash on the iPad to Apple dropping support for floppy drives. Do you believe there is any value to this analogy and why?
    7. What do you think could be some good aspects of no USB on the iPad?
    8. What affect will the implementation of HTML5 have on the issues with iPad's lacking Flash capabilities?
    9. How did you gain an interest in Apple how would you rate that product and would it it recieve a higher rating if it provided USB/Flash?
    10. Would you be more interested in purchasing a Apple product if USB use was provided? Or would this quality not have any affect on your decision to purchase the product?

    This sounds more like a marketing survey...

  • Can somebody give some real time questions for alv report

    hi guru
    can somebody give some real time questions for alv report.
    answers also.
    regards
    subhasis.

    hi,
    The ALV is a set of function modules and classes and their methods which are added to program code. Developers can use the functionality of the ALV in creating new reports,  saving time which might otherwise have been spent on report enhancement
    The common features of report are column    alignment, sorting, filtering, subtotals, totals etc. <b>To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).</b>
    Using ALV, we can have three types of reports:
       1. Simple Report
       2. Block Report
       3. Hierarchical Sequential Report
    <b>Reward useful points</b>
    Siva

  • How to programmatically get the source for a class provided the class name?

    Hello,
    As a quick background, I am providing some tools to potential users of an in-house framework. One is the ability to generate quick prototypes from our existing demo applications. Assume a user downloads our jars and uses them in their project (we are using Eclipse, but that detail should not greatly affect my question). Included in the jars is a demos package that contains ready-to-run classes that serve to exhibit certain functionality. Since many users may just need quick extensions of these demos, I am trying to provide a way for them to be able to create a new project that starts with a copy of the demo class.
    So, the user is provided a list of the existing demos (each one uses a single class). When the user makes their selection, with the knowledge of our framework, I can translate that into what demo class they need (returned as a string of format package.subpack1.subpackn.DemoClassName). What I now want to do is to use that complete class name to get the source (look up the file) for the corresponding class, and copy it into to a new file in their project (the copying into the project can be done easily in Eclipse, so what I need help with is the bolded part). Is there a simple way to get the source given a class path for a class as described above? You may assume the source files are included in the jars for the framework.
    Thanks in advance.

    If there's a file named "package.subpack1.subpackn.DemoClassName.java" in a "demos" directory in the jar, then yes. You'd just use
    InputStream code = getResourceAsStream("/demos.package.subpack1.subpackn.DemoClassName.java");Or if those dots in the name actually separate directory names, i.e. you have a "package" directory under "demos" and a "subpack1" director under that and so on, then:
    InputStream code = getResourceAsStream("/demos/package/subpack1/subpackn/DemoClassName.java");

  • Please answer a programming question for an admin

    I'm not a programmer (although my interest is growing), so I can't answer this question in a discussion regarding how Win32API w/OLE and COM is SO much better than programming for Unix/OS X applications.
    The original discussion was in regards to OS X's superior Unix based security, he devolved to this. Having only begun my venture into programming, his questions are a little above my head at this point. I'm also interested (as an amature programmer), how this would be accomplished in OS X/Unix.
    Thanks in advance.
    Here's his position:
    *(1st entry)*
    I have unsed Windows and many flavors of Unix and I have written programs in Assembler, Fortran, Pascal, Cobol, RPG, Smalltak, Basic, PowerBuilder, Delphi, C, C++, C#, Java, and Perl, and I have been programming for over 20 years, so I do have extensive knowledge about programming.
    So I have one question for you:
    If you had to build a business application that has to allow users to, spell and grammer check, and perform financial calculations, and render the HTML, how would you compare the effort to do this in Windows versus that in Linux, AIX, Solaris or any other Unix operating system?
    I can make this business application have these features in ONE DAY on Windows, because COM and OLE lets me, use Word to spell and grammer check, Excel to do the financial calculations, and IE to render the HTML!
    I make my living building complex customized business software, and Windows allow me to build these applications by myself in weeks, when it would take me and a team of programmers months to do these same things in Unix because of the lack of an the Win32 API, COM, and OLE, or I would have to BUY third party libraries that did these things, and deal with the licensing, versioning, and vendor problems that go with them, and none of those third party librabries would be close to Word, Excel, and IE in CAPABILITY!
    HONESTLY tell me and others reading this thread how you would go about create the customized business application I described above by yourself in a Unix instead of Windows, and tell us how many MONTHS or YEARS it would take you, or how you would have to BUY some other third party libraries to do what Word, Excel, and IE!
    Anyone who thinks a Unix has more CAPABILITIES than Windows, has never used Win32API/COM/OLE/.Net, and does not build customized complex business software for a living, because we people that do are the reason that you find some much customized business desktop software for Windows, and so little for any Unix.
    I have nothing against Unix, and it is great for simple business tasked server software, but for complex business tasked desktop software Windows with Win32API/COM/OLE/.Net wins hands down!
    *(2nd Entry)*
    A System administrators view of an operating system and an application developers view are entirely different, and the Win32API/COM/OLE/.NET simply make my job so much easier, and you simply don't understand because you do not have to deal with the "dirty' details of making what a user wants, which is why your definition of "integration" and mines are totally different!
    With the spell check you talked about, how will you keep in in synch with the dictionary in Word where the user is constantly adding and removing words?
    No, you would have the user to have to maintain two different spell check dictionaries, and you would totally ignore the grammer check requirement!
    Cutting and pasting data between applications is simple integration, and not the complex type that I am talking about.
    Can you make your application display and use the MacGourmet menus appear in its own window, and to access and use the MacGourmet functionality (ie. search for a recipe) in its own window?
    Give me one example of a Unix application that can display the menus of another application, yet alone control its features!
    Of course you can't, because you need COM and OLE!
    I am quite familiar with different flavors of Unix, but those operating systems do not have the rich API and program integration features namely COM and OLE that Windows has, because it violates the Unix idea of security by process isolation!
    Yes that idea of process isolation keeps the operating system safe from malicious code in applications and from one application taking the others down, but you lose the power of programs working together, and you simply cannot build the type of customized business applications that I build by myself, without reinventing the wheel over and over and without having a large team with lots of programmers.
    For example, my customers and millions of others spend all day working in Word and Excel, and the Windows idea that I can transparently integrate my complex business applications right in Word and Excel menu, and into their templates and macros, is why third party developers like me prefer Windows over Unix, regardless of how much better security in Unix is.
    Do not get me wrong, Java improves business application development on Unix, but unfortuantely it is not feasable to rewrite ever legacy application in Java, and Java does not integrate well with other programming languages.
    I used to code business application for both IBM MVS and Sun Solaris, and I never want to go back to those "bad" old days again, once I took the time to learn how to PROPERLY code using Win32API/COM/OLE/.NET!

    At risk of feeding the troll I'll wander in here:
    NOTE: Since this is an Apple programming boards and I have limited experience programming on traditional Unix systems (and most of that in college) I will confine my answers to the area I know.
    If you had to build a business application that has to allow users to, spell and grammer check, and perform financial calculations, and render the HTML, how would you compare the effort to do this in Windows versus that in Linux, AIX, Solaris or any other Unix operating system?
    I can make this business application have these features in ONE DAY on Windows, because COM and OLE lets me, use Word to spell and grammer check, Excel to do the financial calculations, and IE to render the HTML!
    Note that this scenario assumes the user has Microsoft office installed. The person argues that they don't have to purchase libraries to program but what they are effectively doing is simply transferring that cost to user. I don't have to purchase libraries but everyone of my users needs to. Good for you, very good for Microsoft but bad for your customer - IMHO. OK, I know "But all Windows business users have Office installed already." When it comes free with the system then I'll retract my objection.
    Under OS X and Cocoa many of these functions are intrinsic to the system layer and do not require any applications to be installed. Using Cocoa you can write a simple Word processor that has rulers, full font manipulation (including kerning, spacing and leading), Document Save and Load, Printing, Export to PDF as well as spell-checking in under 10 lines of actual code. Adding a custom file type and icon for full system integration will add another 5 minutes to your programing.
    In case you think I'm blowing smoke here is a tutorial from 2002 (yes, this has been possible for over 5 years) outlining the 8 line Word Processor build in Cocoa. http://www.stone.com/TheCocoa_Files/What_s_sofunny.html
    And yes, Cocoa also includes Webkit so I can add full HTML rendering by dragging in a WebKit window to my user interface. For an experienced Cocoa programmer this certainly sounds like less than a day of programming - in fact it sounds like a good tutorial for a middle-experienced training day or 2 day class in Cocoa.
    I won't include the link to the 1 line web browser you can build in Cocoa using Webkit because it's shorter than the description. Feel free to search for it if you want to.
    HONESTLY tell me and others reading this thread how you would go about create the customized business application I described above by yourself in a Unix instead of Windows, and tell us how many MONTHS or YEARS it would take you, or how you would have to BUY some other third party libraries to do what Word, Excel, and IE!
    BUT this is all done from the stock system that is on every OS X computer not simply those with Office installed. Obviously you'd need to add some features that were more complicated than this - because any halfway decent programmer could turn this stuff out - and polish takes a while but to meet the requirements of the challenge it would take 2 days tops.
    Is every *nix programming environment like this? I don't know I can only answer for the system that I have experience with and is the concern of this board. If you really have questions regarding *nix programming then I suggest you find an appropriate board and troll^H^H^H^H^H ask there.
    If you're ever serious about programming on the Mac feel free to stop by and actually take a look at it. I think you'll be surprised.
    =Tod

  • How to search for a Class by incomplete name?

    Hello.
    Does anyone know if it is possible to get an instance of the Class object for a class that I don't have a fully qualified name for?
    For example, I want to get the object I would normally get by calling
    my.project.package.web.jsf.MyConstants.classexcept that I only have the "MyConstants" part of the name.
    Is it possible to somehow use the classloader to search for <i>my.project.package.web.jsf.MyConstants</i> class when I only have <i>MyConstants</i> to start with?
    Thanks.

    vace117 wrote:
    Besides, getting this to work is not really that important. At this point it mostly bothers me as a theoretical question. Can it be done?If you're asking whether it's possible to have a situation where you have two classes with the same name, but in different packages, and that the JVM can look at just the class name and figure out which of the two classes you really meant to use...well, sure, in that (I suppose) you could write something that would search the entire classpath looking for the matching classes, and then apply some heuristics with something like BCEL to try to guess which class you really meant to use. It'll be ugly code and it won't be foolproof, but if you really want it...there you go.
    Ultimately, there's a baseline of information that the JVM needs -- in this case the full name of the class. If you start with only partial information, you're going to have to provide some way to derive the full information. Information doesn't just pop into existence magically. The cleanest, easiest way to provide the information is to provide all of it to begin with. The second cleanest, easiest way is to prepend a standard package name. It gets uglier from there.
    You could do is design a custom classloader that specifies classes in a different way...but I suspect that you'd find that ugly as well.

  • I want authorization for SAP classes

    my company are provided computer courses.I want authorization for SAP classes.what are i doing for this process

    Hi,
    can you please reformulate your question? Are you looking to become an authorized training partner? If so which country?
    Thanks,
    Arnold

  • TestStand create different object for singleton class

    Hi all,
    we have a singleton class which has some functions used to do testing a harware.
    Our main Exe will create an object for that singleton class(which opens Com1 port and communicate with hardware). so the Exe will do basic communication test with hardware it is working well. We are using Teststand operator interface to do various testing by using sequence files. Main exe will use teststand usercontrols to execute tests when the user clicks Testbutton. after that, teststand try to create an object for that singleton but it returns new object not the existing one which is created by EXE. So it throwing me exeception "Com1 port access denied." (since we created object for signleton class @ very first in EXE)
    My question is Since that teststand runs in a separate Appdoamin will the singltonclass create separate object for different appdomain? if so is there any solution to reslove this?
    Hope i clearly explained my probs.
    Thanks in advance
    Srini 

    Hi Srini,
    How are you calling the executable?  From a Call Executable step?  Or are you using another means of calling it?   Also, why is TestStand trying to recreate the object?  As long as you have the correct handle to the object I don't think it matters what app domain you are in.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Can I convert a proxy for a class that does not has any interfaces?

    Can I convert a proxy for a class that does not has any interfaces?

    Hi.
    I can hardly understand your question: what do you want your proxy (what kind of proxy?) to be converted into?
    All I can tell you is the following: Proxies created using java.lang.reflect.Proxy can only be created using an interface. This interface has to be implemented by the proxied object. So: no interface, no java.lang.reflect.Proxy.
    Bye.

  • Allow to create, only two objects for a class

    Hi,
    This question is asked in my interview. In singleton concept only one object is created, likewise only two objects are created for a class.
    For that i have write a code like this,
    public class OnlyTwoObjects {
         private static OnlyTwoObjects a1;
         private static OnlyTwoObjects a2;
         public static int n = 0;
         public static OnlyTwoObjects getInstance() {
              if (a1 == null) {
                   a1 = new OnlyTwoObjects();
                   return a1;
              } else if (a2 == null) {
                   a2 = new OnlyTwoObjects();
                   return a2;
              } else if (n == 1) {
                   return a1;
              } else if (n == 2) {
                   return a2;
              return null;
    } But they told this is not good way to do this.
    I don't know how to do this, if any body knows kindly let me know.

    vijay wrote:
    But i will explain my code, in that code we are allowed to create only two objects, Maximum. Understood.
    suppose both objects are created, then i will ask which object you need first or second, this is decided using the variable n if it is 1 then it will return the first object and it is 2 it will return the second object. sorry i didn't explain this in my previous post.This is your approach. Is this the requirement as well? Is it necessary that the user decide on which instance (first or second) is returned?Even if it was the requirement that the user decides which instance (first or second) is returned, with the original proposed implementation, the user only gets to decide which instance after calling getInstance() twice. If he calls getInstance() with n=2 when a1 is still null, he still gets a1. If he calls getInstance with n=1 when a2 is still null but a1 is non-null, then he gets a2. As is, he always gets a1 on the first call, a2 on the second call, and after that gets null unless he has set n to 1 or 2. (This explanation ignores any multi-threading issues that may come into play. This explanation is for a single thread.)

  • Discussion -- Call for answers : Class and Component

    Dear all,
    1. Component has a clear seperation between the specification and implementation? I can't understand here.The interface define some operations,but eventually we need coding to realize it. Where is the speration?
    A class also has methods and coding to realize it. But why we never say a class has a seperation between the specification and implementation?
    2. Component has interface; Java has interface. Are they the same idea or different?
    Call for answers.
    Thanks
    Kevin

    Hi, Kevin,
    First of all, I need to clarify some terminologies and then try to anwser your questions.
    (1) Interface only defines operations, but does not specifies how to implement those operations. In Java, abstract class and interface are interfaces. In CORBA, IDL is interface which can be implemented by differenct programming languages.
    (2) Java class is both an interface and an implementation, because it not only defines operations, but also implements the operations.
    (3) Component provides some specific functionalities, but is not a full-featured application. Usually, a full-featured application consists of many different components. A component can be large or small. A component can be as large as consisting of tens or hundreds of interfaces and classes, like EJB container and server. On the other hand, a component can be as small as comprising only one class; suppose you write a component to calculate foreign currancy conversion.
    (4)Specification is a written document that tries to standardize the development of a large component. A specification specififies each party's responsibilities, such as application developers'responsibilities, vendor's responsibilities, administrtor's responsibilities and so on. Also, it specifies the contracts (interfaces) between each party. In doing so, a component can be made very reuseful and can be plug-in and play; changing different vendor's component without breaking application developer's owner code.
    In Java world, you see a lot of specifications, such as JDBC, EJB and JMS. When SUN defines those specifications, they use Java interfaces rather other classes to specify interfaces. Here, clear seperation between interface and implementation is very important. (1) If a class is used to specify an interface, SUN must provide implementation for the class. But, the purpose of the specification to allow different vendors to provide implementation.(2) Implementation details can very complex and different vendors may implement the same component very differently. A specification only specifies interfaces but not the implementation. The implementation is up to the vendors. Any implementation is ok as long as they comply to the contracts (interfaces). For instance, one vendor may implement a specified interface using one class and another vendor may implement the same interface using three classes. If a class is used to specify an interface, you restrict vendors' implementation. Usually, in a specification, if you find a class that is used to defines an interface, it means that SUN will provide common implementation for it and vendors do not need to implement it.
    In OO design and programing, clearly seperating interfaces from implementations is vital. We should program interface rather than program implementation.
    Thanks.
    Tommy

  • JRockit H27.2.1 for Harmony Class Library released now

    JROCKIT H27.2.1 FOR HARMONY CLASS LIBRARY RELEASED NOW
    BEA has released a 32-bit partial implementation of the Java Standard Edition Version 5 Specification for Windows on the Intel architecture that will work with the Apache Harmony Class Library for evaluation purposes.
    DOWNLOAD(S) AND VERSION(S)
    The JRockit H27.2.1 version has been tested with the Apache Harmony Class Library hdk-r487452 version.
    * JRockit H27.2.1 (http://dev2dev.bea.com/jrockit/jrockitVM)
    * Apache Harmony Class Library hdk-r487452 (http://people.apache.org/builds/harmony/snapshots)
    DISCLAIMER
    JRockit H27.2.1 is an experimental release for evaluation purposes only.
    BEA will not support this VM. BEA does not guarantee updates or service packs to this VM. The supplied class library implementation is incomplete and not Java compatible. Use H27.2.1 on your own risk.
    This BEA JRockit VM is not a part of the Apache Harmony project.
    BEA will follow up issues and questions regarding this release at this forum as time allows, but cannot guarantee responsiveness.
    HOW TO INSTALL
    * Download the Apache Harmony Class Library hdk from http://harmony.apache.org
    Unpack this to a location of your choice.
    * Locate the directory <path-to-jre>/bin. Preferably rename or remove the subdirectory 'default' (this is not required but recommended)
    * Download JRockit H27.2.1 from http://dev2dev.bea.com/jrockit/jrockitVM
    Unpack JRockit H27.2.1 to <path-to-jre>. You should now have a new subdirectory named 'default' in the 'bin' directory.
    * Verify by running '<path-to-jre>/bin/java -version'. If the program reports running JRockit this means the product is now installed.
    KNOWN ISSUES
    * There is no bytecode verifier supplied with JRockit for Harmony.
    * The core class library provided by JRockit for Harmony is not java compliant, nor is it a complete implementation of J2SE 5.
    * There is no support for java.lang.management.
    * There is no support for extended JRockit tools (such as management console).
    * There is no support for debugging via JDI. JRockit for Harmony contains an implementation of JVMTI (Java Tools and Management Interface), but no bridge for JDI.?

    See the documentation on how to disable optimizations for just a single method: http://e-docs.bea.com/jrockit/geninfo/diagnos/crash.html#wp1002526
    If you need a fix, please open a support case with BEA.
    Thanks,
    /Staffan

  • HI, I'm having problems initializi​ng object for CNiFgen class.

    Hello, I'm having problems initializing object for CNiFgen class, I declare a pointer *m_pFgen to the CNiFgen class, then m_pFgen = new CNiFgen(m_driver, true, true) and then it gives me an error message Primary Error: (Hex 0xBFFA000C) Invalid attribute.

    Here is how to make a call to initialize a session to niFgen:
    //Create a new session on the device
    _session = new CNiFgen(m_resourcename);
    Also. I'm attaching an example on how to generate standard waveforms with the class interface for Fgen.
    Let me know if you have any other questions,
    Jack Arnold
    Applcation Engineer
    National Instruments
    Attachments:
    niFgen_Function_Generator_Ex.zip ‏5569 KB

  • Question for SelectItem

    Hi, everybody
    I've got a question, for example, I have a table PERSON in database, there are the names, I need take all this names with the format of SelectItem in jsf page, then I select one of this name to get id person, then i store in another table like student?
    How can it work, anybody has an idea?
    Nicos.

    I found there is another question. If I need acces to
    a database, in your class, I can not find where is the
    request, like SELECT * FROM...WHERE...
    Would you please tell me a little bit more!
      public List getSites() throws SQLException {
        if (sites == null) {
          sites = dataAccess.resultSetToSelectItems(SQLView.Site.select);
        return sites;
      }"SQLView.Site.select" - that the SQL query from class SQLView:
    // This is the central location for all sql related statements
    public class SQLView {
      private SQLView() { } //Prevents instantiation
      public class Field {
        public static final String id = "id";
        public static final String name = "name";
      public class User {
        public static final String select =
            "select id, name from User order by name";
        public static final String selectById =
            "select id, name from User where id = ?";
        public static final String insert =
            "insert into User(name) values(?);";
      public class UserRole {
        public static final String selectByUserId =
            "select role_id, Role.name as roleName " +
            "from UserRole, Role " +
            "where (UserRole.role_id = Role.id) and (UserRole.user_id = ?)";
        public static final String insert =
            "insert into UserRole(user_id, role_id) values(?, ?);";
        public static final String deleteByUserId =
            "delete from UserRole " +
            "where (user_id = ?)";
        public static final String user_id = "user_id";
        public static final String role_id = "role_id";
        public static final String roleName = "roleName";
      public class Role {
        public static final String select =
            "select id, name from Role order by name";
      public class Login {
        public static final String selectByName =
            "select user_id, password from Login where name = ?";
        public static final String selectByUserId =
            "select name, password from Login where user_id = ?";
        public static final String insert =
            "insert into Login(user_id, name, password) values(?, ?, ?);";
        public static final String deleteByUserId =
            "delete from Login " +
            "where (user_id = ?)";
        public static final String password = "password";
        public static final String user_id = "user_id";
      public class Unit {
        public static final String select =
            "select id, name, package, measure, quantity " +
            "from Unit order by name";
        public static final String selectItems =
            "select Unit.id, Unit.name " +
            "from Unit " +
            "order by Unit.name";
        public static final String unit_package = "package";
        public static final String measure = "measure";
        public static final String quantity = "quantity";
      public class ProductCategory {
        public static final String select =
            "select id, name from ProductCategory order by name";
      public class Product {
        public static final String select =
            "select Product.id, Product.category_id, Product.name " +
            "from Product " +
            "order by Product.name";
        public static final String selectByCategory =
            "select Product.id, Product.category_id, Product.name " +
            "from Product " +
            "where Product.category_id = ? " +
            "order by Product.name";
        public static final String selectItemsByCategory =
            "select Product.id, Product.name " +
            "from Product " +
            "where Product.category_id = ? " +
            "order by Product.name";
        public static final String category_id = "Product.category_id";
      public static final String select =
          "select Product.id, Product.category_id, ProductCategory.name as category, Product.name " +
          "from Product, ProductCategory " +
          "where Product.category_id = ProductCategory.id " +
          "order by Product.name";
      public class Site {
        public static final String select =
            "select id, name from Site";
      public class HealthcareProviderPerson {
        public static final String select =
            "select ProviderPerson.id," +
              "concat(ProviderPerson.lastName, ' ', ProviderPerson.firstName) as name " +
            "from ProviderPerson, ProviderParty " +
            "where (ProviderPerson.id = ProviderParty.id) and " +
              "(ProviderParty.healthCareProvider_id is not null)";
      public class Supplier {
        public static final String select =
            "select id, name from Supplier order by name";
      public class InventoryItem {
        public static final String selectByCategory =
            "select InventoryItem.id, InventoryItem.product_id, Product.name as product, " +
            "InventoryItem.supplier_id, Supplier.name as supplier, InventoryItem.GTIN, " +
            "InventoryItem.unit_id, Unit.name as unitName, InventoryItem.unitsInStock, " +
            "InventoryItem.unitsOnOrder, InventoryItem.reorderLevel " +
            "from InventoryItem " +
            "left join Product on (InventoryItem.product_id = Product.id) " +
            "left Join Unit On (InventoryItem.unit_id = Unit.id) " +
            "left Join Supplier On (InventoryItem.supplier_id = Supplier.id) " +
            "where Product.category_id = ?";
        public static final String insert =
            "insert into InventoryItem("+
            "product_id, supplier_id, GTIN, unit_id, " +
            "unitsInStock, unitsOnOrder, reorderLevel) " +
            "values(?, ?, ?, ?, ?, ?, ?);";
        public static final String update =
            "update InventoryItem set " +
            "product_id = ? ," +
            "supplier_id = ? ," +
            "GTIN = ? ," +
            "unit_id = ? ," +
            "unitsInStock = ? ," +
            "unitsOnOrder = ? ," +
            "reorderLevel = ? " +
            "where (id = ?);";
        public static final String delete =
            "delete from InventoryItem " +
            "where (id = ?)";
        public static final String decrementUnitsInStock =
            "update InventoryItem set unitsInStock = InventoryItem.unitsInStock - ? where (id = ?);";
        public static final String incrementUnitsOnOrder =
            "update InventoryItem set unitsOnOrder = InventoryItem.unitsOnOrder + ? " +
            "where (product_id = ?) and (unit_id = ?);";
        public static final String decrementUnitsOnOrder =
            "update InventoryItem set unitsOnOrder = InventoryItem.unitsOnOrder - ? " +
            "where (product_id = ?) and (unit_id = ?);";
        public static final String search =
            "select InventoryItem.id " +
            "from InventoryItem " +
            "where (product_id = ?) and (unit_id = ?)";
        public static final String id = "InventoryItem.id";
        public static final String product_id = "InventoryItem.product_id";
        public static final String product = "product";
        public static final String supplier_id = "InventoryItem.supplier_id";
        public static final String supplier = "supplier";
        public static final String GTIN = "InventoryItem.GTIN";
        public static final String unit_id = "InventoryItem.unit_id";
        public static final String unitName = "unitName";
        public static final String unitsInStock = "InventoryItem.unitsInStock";
        public static final String unitsOnOrder = "InventoryItem.unitsOnOrder";
        public static final String reorderLevel = "InventoryItem.reorderLevel";
      public class CatalogItem {
        public static final String selectByCategory =
            "select CatalogItem.id, Product.name, CatalogItem.product_id," +
            "CatalogItem.unit_id, Unit.name as unitName, CatalogItem.unitPrice " +
            "from CatalogItem, Product, Unit " +
            "where (CatalogItem.product_id = Product.id) and " +
            "(CatalogItem.unit_id = Unit.id) and Product.category_id = ?";
        public static final String insert =
            "insert into CatalogItem(product_id, unit_id, unitPrice) " +
            "values(?, ?, ?);";
        public static final String id = "CatalogItem.id";
        public static final String product_id = "CatalogItem.product_id";
        public static final String productName = "Product.name";
        public static final String unit_id = "CatalogItem.unit_id";
        public static final String unitName = "unitName";
        public static final String unitPrice = "CatalogItem.unitPrice";
      public class Order {
        public static final String selectById =
            "select Order.id, " +
            "Order.requiredDate, Order.shippingDate, " +
            "concat(ProviderPerson.lastName,' ',ProviderPerson.firstName) as providerName, " +
            "Site.name as site, User.name as user " +
            "from `Order`, ProviderPerson, Site, User " +
            "where (Order.customer_id = ProviderPerson.id) and " +
            "(Order.user_id = User.id) and " +
            "(Order.site_id = Site.id) and Order.id = ?";
        public static final String selectByCriteries =
            "select Order.id, " +
            "Order.user_id, Order.customer_id, Order.site_id, Order.status_id, " +
            "Order.date, Order.requiredDate, Order.shippingDate, " +
            "concat(ProviderPerson.lastName,' ',ProviderPerson.firstName) as provider, " +
            "Site.name as site, User.name as user, OrderStatus.name as status " +
            "from `Order`, ProviderPerson, Site, User, OrderStatus " +
            "where (Order.customer_id = ProviderPerson.id) and " +
            "(Order.user_id = User.id) and " +
            "(Order.site_id = Site.id) and (Order.status_id = OrderStatus.id) and " +
            "(? <= Order.requiredDate) and (Order.requiredDate <= ?) and " +
            "(Order.site_id = ?) and " +
            "((Order.customer_id = ?) or (0 = ?)) and " +
            "((Order.status_id = ?) or (0 = ?))";
        public static final String insert =
            "insert into `Order`(user_id, customer_id, site_id, status_id, Order.date, requiredDate) " +
            "values(?, ?, ?, ?, ?, ?);";
        public static final String updateStatus =
            "update `Order` set status_id = ? where (id = ?);";
        public static final String id = "Order.id";
        public static final String user_id = "Order.user_id";
        public static final String customer_id = "Order.customer_id";
        public static final String site_id = "Order.site_id";
        public static final String status_id = "Order.status_id";
        public static final String date = "Order.date";
        public static final String requiredDate = "Order.requiredDate";
        public static final String shippingDate = "Order.shippingDate";
        public static final String provider = "provider";
        public static final String site = "site";
        public static final String user = "user";
        public static final String status = "status";
      public class OrderItem {
        public static final String select =
            "select OrderItem.product_id, Product.name, " +
            "OrderItem.unit_id, Unit.name as unitName, " +
            "OrderItem.unitCost, OrderItem.unitPrice, OrderItem.quantity " +
            "from OrderItem " +
            "left join Product on (OrderItem.product_id = Product.id) " +
            "left Join Unit On (OrderItem.unit_id = Unit.id) " +
            "where (OrderItem.order_id = ?)";
        public static final String delete =
            "delete from OrderItem " +
            "where (OrderItem.order_id = ?) and (OrderItem.product_id = ?)";
        public static final String insert =
            "insert into OrderItem(order_id, product_id, unit_id, unitCost, unitPrice, quantity) " +
            "values(?, ?, ?, ?, ?, ?);";
        public static final String product_id = "OrderItem.product_id";
        public static final String productName = "Product.name";
        public static final String unit_id = "OrderItem.unit_id";
        public static final String unitName = "unitName";
        public static final String unitPrice = "OrderItem.unitPrice";
        public static final String quantity = "OrderItem.quantity";
      public class OrderStatus {
        public static final String select =
            "select id, name from OrderStatus";
      public class Invoice {
        public static final String selectById =
            "select Invoice.id, " +
            "Invoice.Date, " +
            "concat(ProviderPerson.lastName,' ',ProviderPerson.firstName) as providerName, " +
            "Site.name as site, User.name as user " +
            "from `Invoice`, ProviderPerson, Site, User " +
            "where (Invoice.customer_id = ProviderPerson.id) and " +
            "(Invoice.user_id = User.id) and " +
            "(Invoice.site_id = Site.id) and Invoice.id = ?";
        public static final String selectByCriteries =
            "select Invoice.id, " +
            "Invoice.user_id, Invoice.customer_id, Invoice.site_id, Invoice.status_id, " +
            "Invoice.date, " +
            "concat(ProviderPerson.lastName,' ',ProviderPerson.firstName) as provider, " +
            "Site.name as site, User.name as user, InvoiceStatus.name as status " +
            "from `Invoice`, ProviderPerson, Site, User, InvoiceStatus " +
            "where (Invoice.customer_id = ProviderPerson.id) and " +
            "(Invoice.user_id = User.id) and " +
            "(Invoice.site_id = Site.id) and (Invoice.status_id = InvoiceStatus.id) and " +
            "(? <= Invoice.date) and (Invoice.date <= ?) and " +
            "(Invoice.site_id = ?) and " +
            "((Invoice.customer_id = ?) or (0 = ?)) and " +
            "((Invoice.status_id = ?) or (0 = ?))";
        public static final String insert =
            "insert into `Invoice`(user_id, order_id, customer_id, site_id, status_id, Invoice.date) " +
            "values(?, ?, ?, ?, ?, ?);";
        public static final String updateStatus =
            "update `Invoice` set status_id = ? where (id = ?);";
        public static final String id = "Invoice.id";
        public static final String user_id = "Invoice.user_id";
        public static final String customer_id = "Invoice.customer_id";
        public static final String site_id = "Invoice.site_id";
        public static final String status_id = "Invoice.status_id";
        public static final String date = "Invoice.date";
        public static final String provider = "provider";
        public static final String site = "site";
        public static final String user = "user";
        public static final String status = "status";
      public class InvoiceItem {
        public static final String select =
            "select Product.name as productName, InvoiceItem.unit_id, Unit.name as unitName, " +
            "InvoiceItem.unitCost, InvoiceItem.unitPrice, InvoiceItem.quantity, " +
            "InvoiceItem.product_id " +
            "from InvoiceItem " +
            "left join Product on (InvoiceItem.product_id = Product.id) " +
            "left Join Unit On (InvoiceItem.unit_id = Unit.id) " +
            "where (InvoiceItem.invoice_id = ?)";
        public static final String delete =
            "delete from InvoiceItem " +
            "where (InvoiceItem.invoice_id = ?) and (InvoiceItem.inventoryItem_id = ?)";
        public static final String insert =
            "insert into InvoiceItem(invoice_id, inventoryItem_id, product_id, " +
            "unit_id, unitCost, unitPrice, quantity) " +
            "values(?, ?, ?, ?, ?, ?, ?);";
      public class InvoiceStatus {
        public static final String select =
            "select id, name from InvoiceStatus";
    }I'm using inner classes because this way it easy to provide incapsulation.
    Instead of
    public static final String SITE_SELECT = "select id, name from Site";
    I wrote
    public class Site {
        public static final String select =
            "select id, name from Site";
      }And using "SQLView.Site.select" seems more appropriate especially if you need beside "select" also "insert", "delete", "update" on the same table.
    Look here:
    SQLView.Site.insert, SQLView.Site.update, SQLView.Site.delete.
    Don't forget about field names.
    I think it's good idea to use one class like SQLView per database because exist so many connections between different tables in same database.
    I show whole SQLView class just for demonstration that so much SQL constants you will have to provide in application in case if you don't use some kind of java database related framework.
    And we need the way to reduce difficalties of using SQL Statements in our java applications.
    Vladimir

Maybe you are looking for

  • How do I fix ? when I log into my yahoo mail the words are so small I cant read it

    Any place else it is fine but about a month ago when I log into my yahoo mail the words are so small I can barley read it. If I go to internet Explorer it is fine but I don't want to use that. It is only in my email.

  • Is it possible to change GPU in DV5 ?

    Hi I have a HP Pavilion DV5 1207AU notebook with HD 3200 Graphics with 256 MB... Can i change this one with another card with better graphics... If i can then can anyone suggest me which graphics card i can install on it. Any help would be highly app

  • FCP file sizes are twice the size of Quicktime's - any advantage to FCP?

    When I capture footage from my Canon HV40 MiniDV using FCP, the file sizes are almost twice the size as when I capture using Quicktime's Device Native setting. Is there any advantage to capturing with FCP, as the quality seems the same in QT? Or is t

  • CAF CORE COLLECTION_ASPECT_KEY error

    I have a simple entity "Approver" with attribute functions (string) and contacts (String), cardinality 0:n for both. I build UI object based on Object Editor pattern for this Approver Entity service. Also build the UI object based on Relationship Tab

  • SAP Performance Problem with Oracle 10 on Sun SPARC T5240 server

    Dear Friends, We have a performance problem after migrating our SAP ERP 6.0 basis system. We moved to new servers a month ago. According to SAP EarlyWatchAlert Report, CPU response time is too high, altough CPU utilization is never more than 5%, The