Getters & Setters in ABAP?

In C# and in Java we have special functions that operate on private class data called getters and setters.  These are almost always public and allow the "outside" to interact safely with the private class data.  An example would be :
[C#]
public class Vehicle
     private string _make;
     private string _model;
     public string Make { get { return _make; } set { _make = value; } }
     public string Model { get { return _model; } set { _model = value; } }
[Java]
public class Vehicle
     private string _make;
     private string _model;
     public string getMake() { return _make; }
     pubic string setMake(string value) { _make = value; }
     public string getModel() { return _ model; }
     public string setModel(string value) { _model = value; }
This allows controlled access to the private data (_make and _model).  For instance, I can put rules into the setters that makes sure the data is valid that's coming in from the outside, or in both the setter and getter that checks the user's permissions to see if they have the right to access this data.  It's simply a way to implement "encapsulation".
Does ABAP use getters/setters?  If so, are they implemented as in Java or does ABAP have its own implementation?
Thanks!

No reason to be sorry, I understand that you simply didn't know.    Here is the run-down.  You can award points to any answers that you find helpful.  If one answer in particular has solved your problem, you then mark the radiobutton next to that answer which is blue, this gives the person 10 points.  If the answer was very helpful,  then select the green star, this is 6 points to the user, and if helpful, mark yellow star for two points.  If not helpful at all, then don't mark any.  You can also,  mark the thread as "Solved on your own".  This closes the thread by giving it a blue star, but doesn't give any points to anyone(which is what you have done to the other posts  )   It is very good that you have closed the threads, because this gives visibility that your problem was solved or your question is answered.  But awarding 10 points to the answer which solved your issue, will also close the thread.   
You can go back and revisit your other threads and award points according.
Help this helps, and welcome to SDN.
Regards,
Rich Heilman

Similar Messages

  • Using 'variables.instance' structure and implicit getters/setters

    I am adopting the use of creating a variables.instance (I use 'variables.my') structure to separate instance data from the object, however I have a question when it comes to ColdFusion creating implicit getters and setters based on that object's defined properties.
    BEFORE, if I had a Name property, CF would create getName() and setName() for me, and it would update the variables.Name private variable accordingly in each.  But now that my variables are being stored in 'variables.my.Name', does this mean I can no longer use ColdFusion's implicit getters and setters? (because it would improperly be attempting to execute getName and be looking for variables.Name, when that data now exists in variables.my.Name?
    Are there any methodologies around that allow me to utilize CF's implicit getters/setters while using this 'my' instance variable and have them work with one another?

    Thanks for the confirmation Carl.
    How cool, then, would it be if ColdFusion 11 supported something like:
    <cfcomponent
         accessors="true"
         implicitpropertyprefix="my."
    That way I could specify "my." as the property prefix and when it goes to create those implicit getters and settings, it will concatenate that into 'variables.my.' as the prefix when it alters property values or returns them.

  • Hard to Write Good Getters/Setters

    I am thinking about writing a complex wrapper to set and get any floats/strings/ints. Cause hate how OBJ-C handles these references/values and having to deal with headers and main files everytime something changes is a real big headache. On top I hate having to decide if your instance variable should be handled like a reference (which can be shared) or a value (which cannot). Most of the time you want value semantics, but implementation efficiency often makes folks choose reference semantics. Your decision effects how you write your getters/setters. Had to figure this out for myself, as I never found any good explanation of it.
    Not only do you have to deal with the reference/value semantics issue, but reference counting, threading and exceptions also complicate the issue.
    I am should just write a class to handle all this junk and use the #import so I dont have so much incredible redundant code that OBJ-C somehow needs.
    my plan:
    MyClass.SetInt(intname, x);
    SetInt, this will overwrite/declare an existing int variable by that name held in the class.
    x = MyClass.GetInt(intname);
    GetInt, this retrieves an existing int variable by that name held in the class - or returns nil if undeclared.
    but this is all fantasy, still .... I just might try it.

    well, i've been asked to do it.
    I'll make a short overview : I have a program that creates an XML file with some information about a workflow diagram. The company that requires this software wants to get the execution trace that create the XML file, apart from the XML itself, so they can freely modify it without the need of using my app. My app uses their libraries to write the XML. They could overwrite the XML directly but they already got the libraries and the parser to access each element.
    So, they want the execution trace of the code that generates the XML.I think you're going to be far better off inserting logging statements into your code, and building a small self-contained example from the output of those statements.
    If you don't want to do that, and are comfortable with JNI, you can write a trace agent using JVMTI
    Or, you can use aspect-oriented programming to add cutpoints to their methods, with a tool such as [Aspect-J|http://www.eclipse.org/aspectj/]
    There's also a "trace" command in JDB. Haven't used it, so can't tell you whether it will tell you everything you need.
    And there used to be a tracing interface that could be accessed from Java code. At least I seem to remember writing a trace utility in Java. Could be that it's available on the JRockit JVM and not Sun.

  • Getters & setters

    I am a newbie and trying to learn, I have a type & service table
    type
    t_id
    t_name
    blah
    blah
    service
    s_id
    t_id (fk)
    blah
    blah
    For a Add Screen, I have Type in a text field & JTable for the service (can be multiple for one type).
    Now normally when it is recommended to have getters & setters for everything, how do i have setters for the JTable (ie corresponding to the service table).
    I don't want to basically go back and forth the database 50 times , ie do the setter, insert to db, and repeat.
    Both are in the same screen as per the UI design ? How does everyone normally does this ?
    Thanks much

    Now normally when it is recommended to have getters & setters for everything, how do i have setters for the
    JTable (ie corresponding to the service table).That is not the normal recommendation:
    If and only if there is a compelling reason to expose the value of a field member of a class, you should do so through accessor methods, as this allows additional factilities (input validation, logging, etc) to be added and the implementation details to be changed.
    So it's not 'getters and setters for everything', but rather everything that needs to be accessed outside the class should use a getter or setter.
    Is there a compelling reason why the table should be accessible outside your GUI? Normally the view (in this case your JTable + the TableModel wrapper) asks a model (your data structure holding type and table, maybe reusing the generic ones supplied by Swing, maybe not) for the data, and doesn't expose the implementation of the view (the JTable) to the outside world.
    Imagine that, instead of using JTable, you changed your GUI to use a tree where the services were shown under the types; a local implementation change like that shouldn't effect any other part of your application, so only expose the parts of your view that are unchanged by such implementation details.
    Pete

  • Generating Getters/Setters/Interface methods

    Hi All,
    Quick question, ive used Eclipse before, and in it you can generate getters and setters for your class variables
    as well if you have a class that IMPLEMENTS some interface
    it also could let you generate the methods from that interface.
    Can JES 8 do this?
    Let me know how, i am kind of tired of writing myself.
    Thank you everyone

    The getter/setter generator is accessible from the Refactoring menu, in both the main menu and the editor context menu. It is referred to as Encapsulate Fields.
    Implementing methods is available via the keyboard shortcut Ctrl-i and in the Tools menu as "Override Methods".

  • Getters/Setters controversy

    So I'm going back and forth about whether or not to use getters and setters and any alternatives if I don't. I've read some articles that say getters and setters should be avoided at all cost.
    But I have an example program here, with a class called FlightInfo which basically holds all of the flight information such as flight date and the flight number. Wouldn't it be easiest to use getters and setters like the following:
    public class FlightInfo {
            private String date;
            private int flightNumber;
            public String getDate(){
                    return date;
            public setDate(String date){
                    this.date = date;
            public int getFlightNumber(){
                    return flightNumber;
            public setFlightNumber(String flightNumber){
                    this.date = flightNumber;
    }Is there any better alternative to this? Also, the flight date may change for a particular flight number.
    Thanks.
    Edited by: java_fan_69 on Dec 5, 2007 10:33 AM

    This:
            private String date;
            private int flightNumber;
            public String getDate(){
                    return date;
            public setDate(String date){
                    this.date = date;
            public int getFlightNumber(){
                    return flightNumber;
            public setFlightNumber(String flightNumber){
                    this.date = flightNumber;
            }has the same exact effect as this:
            public String date;
            public int flightNumber;They both allow you to access and modify the variables. I tend to favor using getters and setters, even when they don't add anything a) for consistency, so I can always find what I need in the methods, and b) in case they need to change later. For instance, you want to do some check on the flightNumber before setting it, or perhaps return the date in a different format in certain conditions.

  • Help using getters & setters

    I am wanting to make a bean that will connect to a database and bring back data depending on what was entered in a html form. I have been told it would be easier if i make a bean that holds details of a single video. I have done this below, my question is in the servlet that connects to the database how will i use the result set to use these getters and setters?
    package site;
    public class vidBean
         //protected variables
         protected int recording_id;
         protected String title;
         protected String category;
         public void setRecId(int Rec)
              recording_id = Rec;
         public int getRecId()
              return recording_id;
    ... etc

    something likeList<VidBean> videos = new ArrayList<VidBean>();
    while(rs.next()) {
        VidBean video = new VidBean();
        video.setRecId(rs.getInd("id"));
        video.setTitle(rs.getString("title"));
        video.setCategory(rs.getString("category"));
    }

  • Sets, getters, setters, adders, iterators...

    After reading the highly interesting thread about getters and setters and their implications over OO-design, I'm wondering how to manage sets elegantly... and actually any Collection
    Let's say I have a class A that has to reference a set of objects (meaning, as everyone knows, these objects needn't be ordered and can appear only once in the collection)
    As Peter answered, I should go for getters of the like "getObject(int)" with the help of a "nbOfObjects()" method... alright... that seemed logical for ordered data structures like lists... now, how would you manage that with sets, since an indexed "get()" doesn't make much sense... as stated in the Javadoc, the Set contract doesn't guarantee that the order remains the same, so does something like this make sense ?
    class A {
       private Set set = Collections.synchronizedSet(new HashSet()); // or should I declare it as a Collection, even if I know no element should appear twice ? I suppose not...
       // Does it make sense ?
       public Object getObject(int i) {
          Object[] objectArray = set.toArray(); // called every time the user iterates further... looks like ugly overhead to me...
          return objectArray; // or objectArray[i].clone() ?
    If it DOESN'T make sense, how would you iterate over a Set ? Is returning an iterator the only way ? a clone of the collection to allow the user of the getter to use enhanced for-loop (what are its uses otherwise except for "class-internal-iterating" ?) ?
    I'm both interested and confused since I've read this thread which shakes the very foundations of my conceptions on that matter ^^
    thx a lot for any help, examples, comments or links (not too many, plz, I prefer cut&pastes, I'm out of Internet quota for this month at work :p (thank god, I had them make *.sun.com free ^^)) you could provide

    My first point is, make the set private final
    Secondly an index to a HashSet is dangerous concept
    as the order can be completely re-ordered when an
    element is added.
    A better choice would be LinkedHashSet which has a
    consistent ordering.didn't know about that class... interesting indeed :)
    >
    I would suggest that if you need to return the
    collection use Collections.unmodifable or a copy.didn't know about Collections.unmodifiableX() either... sounds great but it looks like an ugly workaround for java's lack of 'const' keyword : / throwing an UnsupportedOperationException at runtime sounds less safe than enforcing constant operations at compile time, doesn't it ?
    >
    As you have a synchronised connection, multithreading
    may be an issue. (ie the size could change while
    another thread is "iterating")
    With the HashSet reordering on an insert could mean
    the same object appearing more than once. e.g.
    appearing at the start of a list and a moment later
    at the end.
    One approach is to maintain an array when the set
    changes and return that.
    private static final String[] NO_STRINGS = new
    new String[0];
    private final Set set =
    et = Collections.synchronizedSet(new
    LinkedHashSet());
    private String[] setItems = NO_STRINGS;
    public void add(String string) {
    synchronized(set) {
    set.add(string);
    setItems = (String[])
    = (String[]) set.toArray(NO_STRINGS);
    public String[] getSet() {
    return setItems;
    Sorry but I find this solution a bit weird... updating two representations of the same data each time a piece of data's added is the kind of things I want to avoid... what's more, using synchronised collections should shield you from having to write "synchronized" all over the place IMHO... what's the point in using a synchronized collection to add to your class an unsynchronized copy ? then you'd be better off synchronizing your add method and using an unsynchronized collection... you're supposed to never access the original collection anywhere else than in its class anyway...
    what about :
    public class A {
       private final Set set = Collections.synchronizedSet(new LinkedHashSet());
       public void addToSet(Object o) {
          set.add(o); // thread-safe anyway, ain't it ?
       public Iterator getObjects() {
          Set constCollection = Collections.unmodifiableSet(set);
          return constCollection.iterator();
       // OR... (can one of the above and below constructs be considered as "better OO" than the other ? if so, why ?)
       public  Collection getObjects() {
          return Collections.unmodifiableSet(set);
    }still a bit lost, but I feel I begin to see the light... :p

  • Attributes getters/setters not found in view object class

    Hi,
    I am using JDeveloper 10.1.3.4 and have a question about customizing display hints in the view object.
    In my application that is to be used by both the students and the administrative staff, I generated both the entity object and view objects for a table from the database. Some of the attributes need customized display format. For example, social security numbers in the datatable is 123456789. For the student users it needs to be displayed in the xxx-xx-6789 format. For staff users, it needs to be displayed in the 123-45-6789 format.
    Therefore I create two view objects from the same entity object, one for students and one for staff, each to have its own display format. To put the customization code in the attributes' getter methods, however, I found that in the view object class files the getter methods are not there. The entity object class file has the getters; however if customization is done there I will not have two different formats.
    What should for the getters to become available in the object class file so that I can customize them?
    Thanks a lot for helping!
    Newman

    Newman,
    Attribute getters would be on the view object ROW class.
    John

  • Force use of accessors? (getters & setters)

    How to prevent/detect the incorrect direct use of properies in cf9 e.g.
    aPerson.FirstName = "Rumplestiltskin";
    ...when a component is rewritten to use accessors e.g.
    aPerson.setFirstName("Rumplestiltskin");
    e.g. a component is changed from...
    Component Person  {
        property name="FirstName" type="string";
    ...to...
    Component Person accessors="true" {
        property name="FirstName" type="string" getter="true" setter="true";
    1) Is it possible to prevent the propeties being set directly?
    e.g. This should cause an error:
    aPerson.FirstName = "Rumplestiltskin";
    In practice, properties can still be set directly even though the component has declared that accessors should be used.  I want to make this illegal im my app.
    2) Is it possible to prevent the use of undeclared properties?
    e.g. This should cause an error:
    aPerson.ChristianName = "Rumplestiltskin"; // non-existent property
    or
    aPerson.furstname = "Rumplestiltskin"; // Mis-spelt property
    In practice, properties can be set even if they don't exist.  I want to make this illegal im my app.
    3) Is it possible to intercept the direct use of properties
    e.g. when this is executed...
    aPerson.FirstName = "Rumplestiltskin";
    ..the function aPerson.setFirstName() is called
    This would make it possible to solve 1), or better still, make the app backwardly compatible.
    When an app is rewritten to use accessors, I don't want to have to change every instance of
    aPerson.FirstName = "Rumplestiltskin";
    ...to...
    aPerson.setFirstName("Rumplestiltskin");
    ...or at least, I want to be told if I've missed one.
    Thanks,
    Julian

    System Information
    Server Details
    Server Product
    ColdFusion
    Version
    9,0,0,251028  
    Edition
    Developer  
    Operating System
    Windows 7  
    OS Version
    6.1  
    Adobe Driver Version
    4.0 (Build 0005)  
    JVM Details
    Java Version
    1.6.0_14  
    Java Vendor
    Sun Microsystems Inc.  
    Java Vendor URL
    http://java.sun.com/  
    Java Home
    C:\ColdFusion9\runtime\jre  
    Java File Encoding
    Cp1252  
    Java Default Locale
    en_GB  
    File Separator
    Path Separator
    Line Separator
    Chr(13)  
    User Name
    XXXX
    User Home
    C:\  
    User Dir
    C:\ColdFusion9\runtime\bin  
    Java VM Specification Version
    1.0  
    Java VM Specification Vendor
    Sun Microsystems Inc.  
    Java VM Specification Name
    Java Virtual Machine Specification  
    Java VM Version
    14.0-b16  
    Java VM Vendor
    Sun Microsystems Inc.  
    Java VM Name
    Java HotSpot(TM) Server VM  
    Java Specification Version
    1.6  
    Java Specification Vendor
    Sun Microsystems Inc.  
    Java Specification Name
    Java Platform API Specification  
    Java Class Version
    50.0  
    CF Server Java Class Path
    ;C:/ColdFusion9/runtime/../lib/activation.jar;  C:/ColdFusion9/runtime/../lib/ant-launcher.jar;  C:/ColdFusion9/runtime/../lib/ant.jar;  C:/ColdFusion9/runtime/../lib/antlr-2.7.6.jar;  C:/ColdFusion9/runtime/../lib/apache-solr-core.jar;  C:/ColdFusion9/runtime/../lib/apache-solr-solrj.jar;  C:/ColdFusion9/runtime/../lib/asn1.jar;  C:/ColdFusion9/runtime/../lib/axis.jar;  C:/ColdFusion9/runtime/../lib/backport-util-concurrent.jar;  C:/ColdFusion9/runtime/../lib/bcel.jar;  C:/ColdFusion9/runtime/../lib/bcmail-jdk14-139.jar;  C:/ColdFusion9/runtime/../lib/bcprov-jdk14-139.jar;  C:/ColdFusion9/runtime/../lib/cdo.jar;  C:/ColdFusion9/runtime/../lib/cdohost.jar;  C:/ColdFusion9/runtime/../lib/certj.jar;  C:/ColdFusion9/runtime/../lib/cf-acrobat.jar;  C:/ColdFusion9/runtime/../lib/cf-assembler.jar;  C:/ColdFusion9/runtime/../lib/cf-logging.jar;  C:/ColdFusion9/runtime/../lib/cf4was.jar;  C:/ColdFusion9/runtime/../lib/cf4was_ae.jar;  C:/ColdFusion9/runtime/../lib/cfusion-req.jar;  C:/ColdFusion9/runtime/../lib/cfusion.jar;  C:/ColdFusion9/runtime/../lib/clibwrapper_jiio.jar;  C:/ColdFusion9/runtime/../lib/commons-beanutils-1.8.0.jar;  C:/ColdFusion9/runtime/../lib/commons-codec-1.3.jar;  C:/ColdFusion9/runtime/../lib/commons-collections-3.2.1.jar;  C:/ColdFusion9/runtime/../lib/commons-digester-2.0.jar;  C:/ColdFusion9/runtime/../lib/commons-discovery-0.4.jar;  C:/ColdFusion9/runtime/../lib/commons-httpclient-3.1.jar;  C:/ColdFusion9/runtime/../lib/commons-lang-2.4.jar;  C:/ColdFusion9/runtime/../lib/commons-logging-1.1.1.jar;  C:/ColdFusion9/runtime/../lib/commons-logging-api-1.1.1.jar;  C:/ColdFusion9/runtime/../lib/commons-net-2.0.jar;  C:/ColdFusion9/runtime/../lib/commons-vfs-1.0.jar;  C:/ColdFusion9/runtime/../lib/crystal.jar;  C:/ColdFusion9/runtime/../lib/derby.jar;  C:/ColdFusion9/runtime/../lib/derbyclient.jar;  C:/ColdFusion9/runtime/../lib/derbynet.jar;  C:/ColdFusion9/runtime/../lib/derbyrun.jar;  C:/ColdFusion9/runtime/../lib/derbytools.jar;  C:/ColdFusion9/runtime/../lib/dom4j-1.6.1.jar;  C:/ColdFusion9/runtime/../lib/ehcache-web.jar;  C:/ColdFusion9/runtime/../lib/ehcache.jar;  C:/ColdFusion9/runtime/../lib/FCSj.jar;  C:/ColdFusion9/runtime/../lib/flashgateway.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-common.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-core.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-opt.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-proxy.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-remoting.jar;  C:/ColdFusion9/runtime/../lib/geronimo-stax-api_1.0_spec-1.0.jar;  C:/ColdFusion9/runtime/../lib/hibernate3.jar;  C:/ColdFusion9/runtime/../lib/httpclient.jar;  C:/ColdFusion9/runtime/../lib/ib6addonpatch.jar;  C:/ColdFusion9/runtime/../lib/ib6core.jar;  C:/ColdFusion9/runtime/../lib/ib6http.jar;  C:/ColdFusion9/runtime/../lib/ib6swing.jar;  C:/ColdFusion9/runtime/../lib/ib6util.jar;  C:/ColdFusion9/runtime/../lib/im.jar;  C:/ColdFusion9/runtime/../lib/iText.jar;  C:/ColdFusion9/runtime/../lib/iTextAsian.jar;  C:/ColdFusion9/runtime/../lib/izmado.jar;  C:/ColdFusion9/runtime/../lib/jai_codec.jar;  C:/ColdFusion9/runtime/../lib/jai_core.jar;  C:/ColdFusion9/runtime/../lib/jai_imageio.jar;  C:/ColdFusion9/runtime/../lib/jakarta-oro-2.0.6.jar;  C:/ColdFusion9/runtime/../lib/jakarta-slide-webdavlib-2.1.jar;  C:/ColdFusion9/runtime/../lib/java2wsdl.jar;  C:/ColdFusion9/runtime/../lib/jax-qname.jar;  C:/ColdFusion9/runtime/../lib/jaxb-api.jar;  C:/ColdFusion9/runtime/../lib/jaxb-impl.jar;  C:/ColdFusion9/runtime/../lib/jaxb-libs.jar;  C:/ColdFusion9/runtime/../lib/jaxb-xjc.jar;  C:/ColdFusion9/runtime/../lib/jaxrpc.jar;  C:/ColdFusion9/runtime/../lib/jdom-1.0.jar;  C:/ColdFusion9/runtime/../lib/jeb.jar;  C:/ColdFusion9/runtime/../lib/jintegra.jar;  C:/ColdFusion9/runtime/../lib/jnbcore.jar;  C:/ColdFusion9/runtime/../lib/jpedal.jar;  C:/ColdFusion9/runtime/../lib/js.jar;  C:/ColdFusion9/runtime/../lib/jsch-0.1.41m.jar;  C:/ColdFusion9/runtime/../lib/jsr107cache.jar;  C:/ColdFusion9/runtime/../lib/jutf7-0.9.0.jar;  C:/ColdFusion9/runtime/../lib/ldap.jar;  C:/ColdFusion9/runtime/../lib/ldapbp.jar;  C:/ColdFusion9/runtime/../lib/log4j-1.2.15.jar;  C:/ColdFusion9/runtime/../lib/lucene-analyzers.jar;  C:/ColdFusion9/runtime/../lib/lucene.jar;  C:/ColdFusion9/runtime/../lib/lucenedemo.jar;  C:/ColdFusion9/runtime/../lib/macromedia_drivers.jar;  C:/ColdFusion9/runtime/../lib/mail.jar;  C:/ColdFusion9/runtime/../lib/metadata-extractor-2.4.0-beta-1.jar;  C:/ColdFusion9/runtime/../lib/mlibwrapper_jai.jar;  C:/ColdFusion9/runtime/../lib/msapps.jar;  C:/ColdFusion9/runtime/../lib/mysql-connector-java-commercial-5.1.7-bin.jar;  C:/ColdFusion9/runtime/../lib/namespace.jar;  C:/ColdFusion9/runtime/../lib/nekohtml.jar;  C:/ColdFusion9/runtime/../lib/ooxml-schemas.jar;  C:/ColdFusion9/runtime/../lib/pdfencryption.jar;  C:/ColdFusion9/runtime/../lib/poi-contrib.jar;  C:/ColdFusion9/runtime/../lib/poi-ooxml.jar;  C:/ColdFusion9/runtime/../lib/poi-scratchpad.jar;  C:/ColdFusion9/runtime/../lib/poi.jar;  C:/ColdFusion9/runtime/../lib/portlet_20.jar;  C:/ColdFusion9/runtime/../lib/postgresql-8.3-604.jdbc3.jar;  C:/ColdFusion9/runtime/../lib/relaxngDatatype.jar;  C:/ColdFusion9/runtime/../lib/ri_generic.jar;  C:/ColdFusion9/runtime/../lib/rome-cf.jar;  C:/ColdFusion9/runtime/../lib/saaj.jar;  C:/ColdFusion9/runtime/../lib/slf4j-api-1.5.6.jar;  C:/ColdFusion9/runtime/../lib/slf4j-log4j12-1.5.6.jar;  C:/ColdFusion9/runtime/../lib/smack.jar;  C:/ColdFusion9/runtime/../lib/smpp.jar;  C:/ColdFusion9/runtime/../lib/STComm.jar;  C:/ColdFusion9/runtime/../lib/tools.jar;  C:/ColdFusion9/runtime/../lib/tt-bytecode.jar;  C:/ColdFusion9/runtime/../lib/vadmin.jar;  C:/ColdFusion9/runtime/../lib/verity.jar;  C:/ColdFusion9/runtime/../lib/vparametric.jar;  C:/ColdFusion9/runtime/../lib/vsearch.jar;  C:/ColdFusion9/runtime/../lib/wc50.jar;  C:/ColdFusion9/runtime/../lib/webchartsJava2D.jar;  C:/ColdFusion9/runtime/../lib/wsdl2java.jar;  C:/ColdFusion9/runtime/../lib/wsdl4j-1.5.1.jar;  C:/ColdFusion9/runtime/../lib/wsrp4j-commons-0.5-SNAPSHOT.jar;  C:/ColdFusion9/runtime/../lib/wsrp4j-producer.jar;  C:/ColdFusion9/runtime/../lib/xalan.jar;  C:/ColdFusion9/runtime/../lib/xercesImpl.jar;  C:/ColdFusion9/runtime/../lib/xml-apis.jar;  C:/ColdFusion9/runtime/../lib/xmlbeans-2.3.0.jar;  C:/ColdFusion9/runtime/../lib/xmpcore.jar;  C:/ColdFusion9/runtime/../lib/xsdlib.jar;  C:/ColdFusion9/runtime/../lib/;  C:/ColdFusion9/runtime/../gateway/lib/examples.jar;  C:/ColdFusion9/runtime/../gateway/lib/;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-awt-util.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-css.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-ext.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-transcoder.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-util.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/commons-discovery.jar;   C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/commons-logging.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/concurrent.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/flex.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jakarta-oro-2.0.7.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jcert.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jnet.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jsse.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/oscache.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/flex/jars/cfgatewayadapter.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/flex/jars/concurrent.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/flex/jars/;  
    Java Class Path
    C:\ColdFusion9\runtime\servers\lib;
    C:\ColdFusion9\runtime\servers\lib\jrun-patch.jar;
    C:\ColdFusion9\runtime\..\lib\macromedia_drivers.jar;
    C:\ColdFusion9\runtime\lib\cfmx_mbean.jar;
    C:\ColdFusion9\runtime\..\lib\oosdk\classes;
    C:\ColdFusion9\runtime\..\lib\oosdk\lib;
    C:\ColdFusion9\runtime\..\lib\oosdk\lib\juh.jar;
    C:\ColdFusion9\runtime\..\lib\oosdk\lib\jurt.jar;
    C:\ColdFusion9\runtime\..\lib\oosdk\lib\ridl.jar;
    C:\ColdFusion9\runtime\..\lib\oosdk\lib\unoil.jar;
    C:\ColdFusion9\runtime\lib;
    C:\ColdFusion9\runtime\lib\cfmx_mbean.jar;
    C:\ColdFusion9\runtime\lib\instutil.jar;
    C:\ColdFusion9\runtime\lib\java2wsdl.jar;
    C:\ColdFusion9\runtime\lib\jrun-ant-tasks.jar;
    C:\ColdFusion9\runtime\lib\jrun-xdoclet.jar;
    C:\ColdFusion9\runtime\lib\jrun.jar;
    C:\ColdFusion9\runtime\lib\jspc.jar;
    C:\ColdFusion9\runtime\lib\migrate.jar;
    C:\ColdFusion9\runtime\lib\oem-xdoclet.jar;
    C:\ColdFusion9\runtime\lib\sniffer.jar;
    C:\ColdFusion9\runtime\lib\webservices.jar;
    C:\ColdFusion9\runtime\lib\wsconfig.jar;
    C:\ColdFusion9\runtime\lib\wsdl2java.jar;
    C:\ColdFusion9\runtime\lib\xmlscript.jar;
    C:\ColdFusion9\runtime\lib\jrun.jar  
    Java Ext Dirs
    C:\ColdFusion9\runtime\jre\lib\ext;C:\Windows\Sun\Java\lib\ext  
    Printer Details
    Default Printer
    Printers
    Microsoft XPS Document Writer
    Fax
    Server Information
    General Settings
    Timeout requests
    Yes  
    Enable Per App Settings
    Yes  
    Request Time Limit
    3600 seconds 
    Use UUID for CFToken
    No  
    Enable Whitespace Management
    Yes  
    Disable Service Factory
    No  
    Protect serialized JSON
    No  
    Protect Serialized JSON Prefix
    Missing Template Handler
    Site-wide Error Handler
    Enable HTTP status codes
    Yes  
    Enable Global Script Protection
    Yes  
    Default CFForm ScriptSrc Directory
    /CFIDE/scripts/  
    Google Map Key
    Maximum size of post data
    100 MB 
    Request Throttle Threshold
    4 MB 
    Request Throttle Memory
    200 MB 
    Request Tuning
    Simultaneous request limit
    10  
    Flash Remoting request limit
    5  
    Web Service request limit
    5  
    CFC request limit
    10  
    CFThread Pool Size
    10  
    Maximum number of report threads
    8  
    Request Queue Timeout
    60 seconds 
    Request Queue Timeout Page
    Maximum number of running JRun threads
    50  
    Maximum number of queued JRun threads
    1000  
    Caching
    Template cache size
    1024 templates 
    Enable trusted cache
    No  
    Cached query limit
    100
    Save Class Files
    Yes  
    Cache web server paths
    No
    Client Variable Settings
    Default client variable store
    Registry  
    Client Stores
    Registry  
    Type
    REGISTRY  
    Description
    System registry.   
    Purge data after time limit
    Yes  
    Time limit
    90 days 
    Disable global updates
    No  
    Cookie  
    Type
    COOKIE  
    Description
    Client based text file.   
    Purge data after time limit
    Yes  
    Time limit
    10 days 
    Disable global updates
    No  
    Memory Variables
    J2EE Sessions
    No  
    Application Variables
    Enable Application Variables
    Yes  
    Default Timeout
    2,0,0,0  
    Maximum Timeout
    2,0,0,0  
    Session Variables
    Enable session variables
    Yes  
    Default Timeout
    0,0,20,0  
    Maximum Timeout
    2,0,0,0  
    ColdFusion Mappings
    /gateway  
    C:\ColdFusion9\gateway\cfc  
    /CFIDE  
    C:\inetpub\wwwroot\CFIDE  
    Mail Connection Settings
    Default Server Port
    587  
    Connection Timeout
    60 seconds 
    Spool Interval
    15 seconds
    Mail Delivery Threads
    10  
    Maintain Connection to Mail Server
    No  
    Spool Messages To
    disk
    Max Messages Spooled to Memory
    50000  
    Default CFMail Charset
    UTF-8  
    Use SSL Connection
    No  
    Use TLS
    Yes  
    Default Mail Server
    smtp.gmail.com  
    Server
    smtp.gmail.com  
    Port
    587  
    Username
    XXXX
    Password
    not shown  
    Mail Logging Settings
    Log Severity
    warning  
    Log all E-mail messages sent by ColdFusion
    No  
    Charting
    Cache Type
    disk images 
    Maximum number of images in cache
    50 images 
    Maximum number of charting threads
    4  
    Disk cache location
    C:\ColdFusion9\charting\cache  
    Java and JVM
    Java virtual machine path
    C:/ColdFusion9/runtime/jre  
    Initial memory size
    MB
    Maximum memory size
    512 MB
    Class path
      -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{appli cation.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars,{applicatio n.home}/../wwwroot/WEB-INF/flex/jars  
    JVM arguments
    -server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib  
    Debugging & Logging
    Debugging Settings
    Enable debugging
    Yes  
    Enable Robust Exception Information
    Yes  
    Display format
    classic.cfm  
    Execution times
    Yes  
    Execution time format
    summary  
    Execution time highlight threshold
    250 ms
    Database activity
    Yes  
    Exception information
    Yes  
    Tracing information
    Yes  
    Timer Information
    Yes  
    Variables
    Yes  
    Variables
    Application
    Yes  
    CGI
    Yes  
    Client
    Yes  
    Cookie
    Yes  
    Form
    Yes  
    Request
    Yes  
    Server
    Yes  
    Session
    Yes  
    URL
    Yes  
    Debugging IP Addresses
    Debugging IP Address Restrictions
    127.0.0.1
    0:0:0:0:0:0:0:1  
    Line Debugger Settings
    Allow Line Debugging
    NO  
    Debugger Port
    5005  
    Max Simultaneous Debugging Sessions
    5  
    Logging Settings
    Log directory
    C:\ColdFusion9\logs  
    Maximum file size
    5000 KB
    Maximum number of archives
    10  
    Log slow pages
    No  
    Slow page time limit
    30 seconds 
    Log CORBA calls
    No  
    Log scheduled tasks
    No  
    Schedule Tasks & Probes
    Scheduled Tasks
    System Probes
    Extensions  
    Java Applets
    CFX Tags
    Custom Tag Paths
    C:\ColdFusion9/CustomTags  
    CORBA
    Selected connector
      [ none]   
    Connectors
    Event Gateways
    Settings
    Enable Event Gateway
    Yes  
    Thread Pool Size
    1  
    Max Queue Size
    10  
    Gateway Types
    SMS  
    Description
    Handles SMS text messaging  
    Class
    coldfusion.eventgateway.sms.SMSGateway  
    Timeout
    30 seconds  
    Kill On Timeout
    Yes  
    XMPP  
    Description
    Handles XMPP instant messaging  
    Class
    coldfusion.eventgateway.im.XMPPGateway  
    Timeout
    30 seconds 
    Kill On Timeout
    Yes  
    SAMETIME  
    Description
    Handles Lotus SAMETIME instant messaging  
    Class
    coldfusion.eventgateway.im.SAMETIMEGateway  
    Timeout
    30 seconds  
    Kill On Timeout
    Yes  
    DirectoryWatcher  
    Description
    Watches a directory for file changes  
    Class
    examples.watcher.DirectoryWatcherGateway  
    Timeout
    30 seconds 
    Kill On Timeout
    Yes  
    Socket  
    Description
    Listens on a socket  
    Class
    examples.socket.SocketGateway  
    Timeout
    30 seconds  
    Kill On Timeout
    Yes  
    CFML  
    Description
    Handles asynchronous events through CFCs  
    Class
    coldfusion.eventgateway.cfml.CfmlGateway  
    Timeout
    30 seconds 
    Kill On Timeout
    Yes  
    JMS  
    Description
    Handles Java Messaging Service messages  
    Class
    examples.JMS.JMSGateway  
    Timeout
    30 seconds  
    Kill On Timeout
    Yes  
    ActiveMQ  
    Description
    Handles Apache ActiveMQ JMS messages  
    Class
    examples.ActiveMQ.JMSGateway  
    Timeout
    30 seconds 
    Kill On Timeout
    Yes  
    DataServicesMessaging  
    Description
    Handles Data Services Messaging messages  
    Class
    coldfusion.eventgateway.flex.FlexMessagingGateway  
    Timeout
    30 seconds  
    Kill On Timeout
    No  
    FMS  
    Description
    Handles Flash Media Server shared objects  
    Class
    coldfusion.eventgateway.fms.FMSGateway  
    Timeout
    30 seconds 
    Kill On Timeout
    Yes  
    DataManagement  
    Description
    Notifies Data Management Services of data changes  
    Class
    coldfusion.eventgateway.flex.FlexDataManagementGateway  
    Timeout
    30 seconds  

  • Custom component/tag class:  ---which setters/getters do what?

    Hi
    I'm trying to create a custom component, but, there is a major concept that I do not understand...
    ---What are the setters/getters in the "component" class used for?...
    ---What are the setters/getters in the "tag" class used for?
    Another way of asking is...
    ---Which setters/getters are used simply to keep track of attribute name/id/key?
    ---Which setters and getters refer to the actual objects that the attribute names point to?
    The reason for my confusion is that nearly all "custom component" examples I've seen thus far, utilize attributes that point to "String" objects... (i.e., as opposed to ArrayList, HashMap, etc)...
    This makes it difficult for me to distinguish whether the String values in the getters/setters are referring to the String name/"id" of the attribute...or, the String "value" of the attribute...
    I have not been able to verify how I should code the getter/setters (and type casts) for other kinds of objects like ArrayLists, HashMaps, etc
    For example, a typical logic mechanism Ive seen in the custom "tag" examples is as follows...
    in a "tag" class...
            if( tabledata != null )
                if (isValueReference (tabledata))
                    FacesContext context = FacesContext.getCurrentInstance ();
                    Application app = context.getApplication ();
                    ValueBinding vb = app.createValueBinding (tabledata);
                    component.setValueBinding ("tabledata", vb);
                else
                    component.getAttributes ().put ("tabledata", tabledata);
    in the "component" class...
        public void setTabledata (List tabledata)
            this.tabledata = tabledata;
        public List getTabledata ()
            if(null != tabledata)
                return tabledata;
            ValueBinding _vb = getValueBinding ("tabledata");
            if(_vb != null)
                return (List)_vb.getValue (getFacesContext ());
            else
                return null;
        }...considering the above code,
    ---when/where should the "tabledata" variable be referring the "name/id" of the attribute?...
    ---when/where should the "tabledata" variable be referring to the "value" of the attribute?...
    ...as, I need to change the type casting to adjust to what it should be...
    ***NOTE: This is one error that I'm getting, and I believe it is because I do not understand how getter/setter is used in "component" and "tag" classe, i.e., :
    "org.apache.jasper.JasperException: jsp.error.beans.property.conversion
         org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)"...
    Thanks for any help on this!
    sd

    The "tabledata" variable always refers the local value of the attribute.
    When using a value binding to some backing bean,
    the local value is null and the model value is owned by the bean.
    You don't need any casting in the tag class nor the component class.
    The setters/getters in the component class specify the type of the attributes.
    Conversion from/to String to/from the type is done automatically if possible.
    When the automatic conversion is impossible, you should specify f:converter
    for the attribute.

  • Getters and Setters in ActionScript and ECMAScript

    Hi ,
    This line is taken from a book , here the Author mentions that
    In ActionScript , getters and setters is not necessary , they are a part of of the core ECMAScript language.
    Can anybody please let me know what is meant by ECMAScript language ??
    Thanks in advance .

    ECMAScript is an ECMA standard.
    Getters and setters are not mandatory (that's what they mean).
    However, they can be useful in many cases.
    - You can check the value in a setter before assigning (e.g checking if it's null)
    - You cannot override properties of a superclass but you can getters/setters just as you can methods
    - You can take some action when the value of the property is changed. There are many examples in UIComponent classes of the Flex framework.
    - You can put a breakpoint in a setter in order to debug data binding (see if it triggers)
    - In order to optimize data binding, you can write [Bindable event="YourCustomEventNameHere")] before the getter/setter and dispatch this event when the value is set so as to enhance performance of data binding (if you just write [Bindable], your properties will be processed by the framework even if their value does not change).
    Also, note how the synthax is different than Java.
    // ActionScript
    private var _myProperty:uint;
    public function get myProperty():uint
      return _myProperty;
    public function set myProperty(value:uint):void
      _myProperty = value;
    // Java
    private Integer myProperty;
    public Integer getMyProperty():
      return myProperty;
    public void setMyProperty(value:Integer):
      myProperty = value;
    Avoid creating getters/setters a la Java in ActionScript (i.e not using the get/set keywords). This is something I have seen in some implementations or auto-generated code from UML.

  • Why use setters and getters?

    Hi.
    I've been wondering woudn't a function with return do the same thing as a get function with return?
    Ex:
    var age:Number = 16;
    function get Age() {
         return age;
    isn't the same as:
    function Age() {
         return age;
    Thanks.

    I respectfully disagree with the statements that it is a matter of nomenclature. Although there are a lot of cases when accessors (getters/setters) are overused, they are definitely extremely useful features of any OO language. In some case code would be much longer and more cumbersome without accessors. I must say that with code written on timeline accessors are less useful (although I can see plenty of cases one can utilize them). When code is written in classes - accessors are indispensable.
    With your age example it is really a matter of preference. But if you need to do more with age - you would definitely appreciate getters/setters.
    For example:
    Say you have a class Person and it has property age:
    public var age:int = 0;
    Somewhere we instantiate this class:
    var myPerson:Person = new Person();
    Now we set age:
    myPerson.age = 23;
    trace(myPerson.age); // returns 23
    Just imagine you instantiate this variable in 100 of places.
    When you think you are done, your boss comes to you and says: “I want you when they set the age also to evaluate what age group person belongs to.”
    If there were no getters/setters – you would have a very hard time chasing all 100 instances in your program and changing your Person class architecture. With accessors you will spend a few minutes only. You can do the following:
    // change the variable to private
    private var _age:int = 0;
    // create accessors
    public function set age(a:int):void{
         _age = a;
         // here you evaluate age
         if (_age < 10) {
              trace("child");
         else if (_age > 10 && _age < 20) {
              trace("teenager");
         else if (_age > 20 && _age < 30) {
              trace("young");
         else {
              trace("too old to bare :-(");
    public function get age():int{
         return _age;
    As you can see you changed the code in one place and while not doing a thing in any of 100 places you instantiated the Person class.
    Again, your boss can come back and ask to restrict the age to people older than 20.
    So may write:
    public function set age(a:int):void {
         if (a > 20) {
              _age = a;
    Again, you met requirements and did not change any code anywhere else.
    One more request from the boss. Say, he wants you to count how many times age was changed. You can use setter to do that:
    private var getterCounter:int = 0;
    public function get age():int {
         getterCounter++;
         return _age;
    You wouldn’t be able to do all these things if there were not accessors.
    Still the use of age variable will stay the same:
    var myPerson:Person = new Person();
    myPerson.age = 34;
    trace(myPerson.age);
    Welcome to scalability and encapsulation. It doesn’t matter what you do when age is set inside Person class – it will not break code anywhere else.
    There are millions more useful cases when getters/setters come handy.

  • Duplicate getters and setters

    Hi,
    Can any one tell me why do we need getters and setters both in class and backing bean? Is not a duplication?
    Here is an example
    In my class Dept I have getDept_Code,getDept_Name and setDept_Code,set_DeptName.
    and in my backing bean(DeptBean) I have same getters and setters.
    please note that in my Dept.jsp I use these as follows
    value="#{DeptBean.dept_code}".
    value="#{DeptBean.dept_name}"
    My question is why dont we use getters and setters in Dept class. and do we need to have getters and setters in backing bean?
    plz explain.

    You just can use the getters in Dept? You don't need to "flatten out the objects".
    MyDto:public class MyDto {
       private String field1;
       private String field2;
       // + getters + setters
    }MyBean:public class MyBean {
        private MyDto myDto;
        // + getter + setter
    }JSF<h:outputText value="#{myBean.myDto.field1}" />

  • Great Idea: Property Annotations alternative to getter/setters

    Currently, a huge amount of Java objects use property fields with getter/setter accessors:
    class MyClass
         protected int xyz;
         public int getXyz() {
              return xyz;
         public int setXyz(int xyz) {
              this.xyz = xyz;
    }.NET uses a slightly simpler syntax which internally generates getter/setter methods:
    class MyClass
         protected int xyz;
         public int Xyz {
              get {
                   return xyz;
              set {
                   xyz = value;
    }Most of the time (90%+), the getters and setters just set/return. Of course, there are times where it's necessary to implement additional logic without changing the interface presented to other classes. However, there are lots of cases where there is huge amounts of trivial getter/setter code. Also, it takes effort to maintain the getters/setters, when fields are added, deleted, or renamed.
    Wouldn't it be much nicer to have trivial getters/setters implied via annotations? Instead of the above examples, do:
    class MyClass
         // defaults to providing both getter and setter.
         @PublicProperty
         protected int xyz;
    }You could have variants for protected access, private access, and parameters for getter only or setter only. And, you would continue to use the traditional syntax when you want to do non-trivial getter/setter logic.
    The big advantage is that this syntax would be much easier to maintain. Much less code to scroll through. Much easier to rename fields. Easier to delete fields. Easier to add new fields without relying on IDE "generate getter/setter" features.
    What does everyone think?

    MelGohan + dizzy,
    Java Beans and every library and framework built on top of Java Beans (such as JSF and EJB 3.0) require getters/setters; they aren't an optional design consideration. I could avoid such libraries entirely, but that is extreme.
    aconst_null + YAT,
    Interesting point about annotation limitations. However, Java Beans based frameworks such as JSF and EJB 3.0 could have support for such annotations. For example, in JSF, when you use {#bean.property}, the framework could check for getProperty()/setProperty() or check for an annotated instance variable named "property".
    Or maybe there should be a language level solution to this rather than an annotation-based patch. Any time there is a large volume of rubber stamp code like this, there is probably a better design.

Maybe you are looking for

  • How can I open PDF's in my favorite display-setting?

    I am using Acrobat Pro. I would like all PDF's to open in Single Page Continuous and 100% Zoom. Under 'Preferences' and 'Page Display', I have already put these settings the way I want. Under 'Accessibility', I have also put the 'Override' settings t

  • Several Software issues with N73

    Hey Im in South-Africa and got a N73 on a contract upgrade. Since i got the phn i noticed several issues/bugs with the software. Im not complaining about the phn. I think it's a great phn, Im only highlighting the problems so that in the next firmwar

  • OBIEE Write Back - Insert New Row

    Hello, I am new to these forums and looking for some help with OBIEE's Write Back feature. I have Write Back working fine with respect to updating existing rows in a table (ie: the UPDATE tag), but was wondering how to force Write back to invoke the

  • X509 certificate in SAML2 assertions

    I'm wondering if anyone knows whether Oracle 10g identity management systems can be configured to include an X509 certificate in SAML2 assertions. I'm being told that it can't be done in 10g. Oracle11g appears to have support, and Oracle 10g seems to

  • After update to ios 5, my ipod touch cannot recharge anymore... it's out of battery now what should I do?

    After update to ios 5, my ipod touch cannot recharge anymore... it's out of battery now what should I do?