DTO with attributes having public access.

Hi
In my application I'm using Data Trandfer Objects for trasfering data between client and server. It's only used for travfering data and as a client side buffer. Shall I keep all the attributes with public access specifiers?Is it against any concepts?
Example:
public class ResourceDetailsTO {
public String resourceId;
public String lastName;
public String firstName;
public String department;
public String grade;
Any help will be appreciated?

>
So my proposal would be a class with a public
constructor, only private attributes and publich
getter methods. Additionally, you should implement
toString to allow easy debugging.
That gets rather tedious when the GUI layer wants to modify a single attribute.
The reason is, that you can easily introduce errors,
if you make all attributes public. Just consider the
following example:
ResourceDetailsTO rdto = receive(); // suppose, this
is some method, which creates a DTO
process(rdto); // here we do something with this DTO
// here you can not know, whether the DTO was modified
by process!!At least in my implementations, I don't try to guess whether it was modified or not. The caller is specifically required to do something different if is modified vs if is not.
And I not sure how this example proves your point. Creating a new object everytime doesn't tell you whether it was modified or not from the original. If you want to track modification then add a setter which sets a flag.
Additionally, if you
implement equals and hashCode, then your DTO could be
a good candidate as a key in a HashMap. Why? The only reason for doing this is to cache the data. So what interface is caching the data? And what happens when the persisted object gets overwritten by another object by another source?
However if the
object is modifyable, then somebody could modify the
attributes, while it is used as a key in some HashMap.Yes, if it used in a hash then modifying it will break it.
But the vast majority will not be used in a hash.
And when it is used in a hash it will not be used as the key.

Similar Messages

  • TS3899 Having trouble accessing my email account thru the mail app, after entering the account information in the settings page, hotmail returns with the error message " The user name or password for Hotmail is incorrect

    Having trouble accessing my email account thru the mail app, after entering the account information in the settings page, hotmail returns with the error message " The user name or password for Hotmail is incorrect". Help

    Hotmail is having problems:
    http://bostinno.streetwise.co/2013/08/15/hotmail-outage-hotmail-is-down-for-user s-still-photos/
    http://www.engadget.com/2013/08/14/outlook-outage/
    http://www.infoworld.com/d/applications/microsofts-skydrive-outlookcom-are-down- some-users-224940
    http://mashable.com/2013/08/14/outlook-down/
    http://techcrunch.com/2013/08/14/microsoft-acknowledges-outlook-com-messenger-sk ydrive-outages/

  • Trying to compare FCP with Media 100 for a Public Access studio

    Hi all,
    I am new here. I do most of the review of products for our Public Access studio. We have a couple of existing Media 100 systems and we are considering adding or upgrading our NLE capabilities. Our studio manager had a chance to look at FCP being used at our high school and she came back with a number of impressions that I wonder about and would like to vet with people who know more about FCP. So, any comments would be helpful.
    The high school media person demo’d FCP for her and let her play with it a bit. After looking at it herself, she says she would definitely say Media 100 is easier to understand/use, especially if you've never used non-linear editing before. That is fairly typical of the people doing Public Access production in our town.
    However, it looks to her like there are a lot of tools that come with FCP that Media 100 either doesn't have or are not easily found in it. For example, she feels FCP’s set up looks more complicated and confusing compared to Media 100’s, but in FCP you can have up to 99 video lines in a program, where with Media 100 we're just going back and forth between the a and b video lines. Plus you can have up to 99 Audio tracks on FCP as well, where our max at the moment is 8. Now as to when you would need 99 video or audio tracks, she is not sure, but it is definitely a capability that we don't have in Media 100.
    Titling looked easier to her on Media 100. With FCP there were a lot of filters involved and hoops to jump through, plus she couldn't do a word with each letter a different color, for example, unless she did each letter on a different track.
    The media person warned her that FCP is really large. Apparently the program itself takes up like 35 GB of space on the hard drive, and a typical 30 min. project comes in at over 100 GB! She couldn't believe it, but she was assured it’s true. Even with our longest programs, like like a School Committee meeting thqat went 3 1/2 hours, it would came in at a max of 30 GB on the Media 100. She got the impression this big difference was so because Final Cut renders everything you do, including rendering any edits you make on your footage as new files, and stores it all in a huge folder. She thinks with Media 100, you import the footage and use it as is - the only things it will render are screen freezes, transitions, and color effects. Is that sort of comparison correct (and fair), or is something being missed?
    She says in her experience that something like iMovie is the most basic as far as what you can do, then Ulead would be a step above that- the editing is basically the same, but you have a few more options. Media 100 would be next as far as ease of use and understanding of the program. FCP seemed a little confusing even to her. Comments or insights?
    G4   Mac OS X (10.4.7)  

    Welcome to the family, maybe.
    I switched from M100 about four years ago, I was never so glad to give that company the boot. A direct comparison just isn't possible but I'll try to answer some questions. There is a Media 100 forum on creativecow.net.
    she says she would definitely say Media 100 is easier to understand/use, especially if you've never used non-linear editing before.< </div>
    Yes, absolutely, M100 has always had an elegant and refined interface. However, the paradigm in FCP is not opaque. It's far more interesting, deeper, more complex. So, yes, it's a bit tougher to grasp. But don't sell your students/users short. They'll get it.
    99 tracks is marketing BS. The serious work is done with nesting. How many public access pieces need more than 5 or 10 video tracks?
    Titling in FCP depends on third party filters like Boris or tools like LiveType and Motion. The basic titling tools in FCP are lame and difficult to use, in my opinion, compared to the elegant titler in M100 (as long as you don't launch Graffiti).
    The installation includes tens of gigs of animation, movie and music loop resources that you don't need to load. The suite includes Motion, LiveType, Soundtrack Pro, DVD Studio Pro and FCP.
    If you're shooting DV, a 3-1/2 hour show is, umm, well, you look it up, DV is DV. But if you're capturing 3 hours from each of three cameras, that's a lot of DV.
    Rendering depends on lots of things. M100's native codec handles lots of realtime stuff that FCP can't unless you've got a huge Macintosh. Previewing is not a big deal at lower rez in FCP, you get used to it. .
    FCP is really scary. You can look at thousands of "I'm in way over my head, HELP!" posts here. But all those folks find they slip right into the Apple paradigm, the weirdly new workflow and start exploring the wide new world of serious editing that FCP opens up. You'll hate it for a few months because it's so dramatically different from M100. You'll love it, though.
    If you want to continue the thread, give the rest of the disaffected former M100 users a few days to post their comments. There are many of us here. Then maybe start a new thread, one question at a time.
    bogiesan

  • SAP systems for public access with OSS ID

    Hi, experts,
    I heard that there is a community in SDN which allow users to access SAP systems (such as CRM, XI/PI, etc.) to test and try things.
    (1) Is that true ? What is the URL ?
         If not, is there any site for public access to SAP systems with or w/o fees ?
    (2) Is there Test Drive for XI/PI ? Could not locate it under downloads.
    Thanks.
    Hans

    Hi Hans,
    As far as I know there is no such site with public OSS ID and free XI test drive.
    But you will get plenty of material from SDN.
    -Pinkle

  • I'm having trouble with iTunes synching and accessing the iTunes store.

    I'm having trouble with iTunes synching and accessing the iTunes store.   When synching, the process tops at the back up stage, freezes and I can't close the iTunes window, need to ctrl alt del.   When trying to access the store, the progress bar stops halfway.   I've googled heaps and tried most of the standard answers - unistall, reinstall, etc, now looking for some help please.
    This has only started a few weeks back, after working smoothly for the 2 years of owning the iPhone 3gs.
    Any suggestions will be appreciated, it's getting realy frustrating.
    Cheers for now,
    Marty

    http://support.apple.com/kb/HT1923?viewlocale=en_US
    this worked perfectly for me, with no loss of library! BUT was warned about uninstalling things in the order listed...FYI.

  • Having trouble accessing internet with new wireless WRT54...

    Having trouble accessing internet with new wireless WRT54G. Used easylink to read existing router BEFSR41 which works great to westell modem provided by Verizon. When connect new router Easylink configures WRT54G but when trying to connect to internet...fails. All lites indicate good. Not using wireless device yet, just the wired ethernet. Router set up as DHCP.
    I keep going back to old router and works great every time. Help! 

    Thanks for response, however I tried setting unit to 192.168.2.1 (leaving DHCP) to no avail. I put my old unit (BEFSR41) back in and I'm back up. I need to sit back and decide which way to go on this. Perhaps it's defective and I should return it.

  • HT4061 Help! I've updated my iPhone 4G with the new iOS7 update and entered the passcode in it and now my iphone is diabled because I can't remember the passcode and the screen keeps showing "iPhone is disabled". Have I lost ever having no access to my iP

    Please help. I can't use my iPhone 4G with it's updated new iOS7. I can't remember my passcode and it stays at "iPhone is disabled".  Have I lost the use of my iPhone forever? It's an iPhone not iPad.
    Message was edited by: diana135

    HT4061 Help! I've updated my iPhone 4G with the new iOS7 update and entered the passcode in it and now my iphone is diabled because I can't remember the passcode and the screen keeps showing "iPhone is disabled". Have I lost ever having no access to my iPhone?

  • I have a MacBook Air with OS X and am having trouble accessing the ADT Pulse Home Security System cameras.  The mobile (iPhone and iPad) apps allow access no problem, but I can't get a picture on the MacBook.  Have tried Safari and Firefox browsers.

    I have a MacBook Air with OS X and am having trouble accessing the ADT Pulse Home Security System cameras.  The mobile (iPhone and iPad) apps allow access no problem, but I can't get a picture on the MacBook.  Have tried Safari and Firefox browsers.  Anyone have any ideas?  Thanks.

    From a Catherine to Katherine -- Had the exact same problem!!  I had to enable Java twice - both in Safari and then on the MacBookAir itself.

  • Having problem accessing MacMini over network with PC's Windows 7

    Hi all,
    I have a Mac Mini with 10.6.x
    Onec in a while, especially when restart Airport Extreme for upgrade or something else (both are connected with ethernet cable cat5e) ALL PC's on the network having problem accessing Mac Mini Server while All MACs are fine and can access all folders no problem. Usually takes about 3-4 min for PC to connect to server. Then  once it is connected (it loads all folder and files in that current window on the PC) i can go from folder to folder with no delays. However if i close the window with all folders then again i have to wait for around 3 min. to load everything all over again. AFP and SMB are ON. Today i made an experiment and turned SMB off and the problem still excist with the difference that after 3-4 min delay no folders were shown.
    It seems that the PCs have hard time establishing connection with the server which is weird that Macs don't have that problem. It must be something with the setting of Mac MIni. Other wise i have no problem accessing Internet so the routher is working fine. DHCP is ON on the AP Extreme.
    I came across as i was searching for this issue and it seems that authentication - Golden triangle or whatever is called - might be the issue in the whole mess. Do you guys think that this might be the case ?
    The only way i have found out to help is to restart the Router and Server and that usually fix the problem  .
    Could you please help me figure what is going on there?
    Here is the original thread: https://discussions.apple.com/thread/3867559?tstart=0 ( i think i posted in the wrong forum )

    The specified changeip -checkhostname command does not make changes to your configuration. 
    To research the command (and that's entirely your perogative), please use Google or Bing to search for previous discussions and details, or review the provided man page documentation for the command.  (Launch Terminal.app (folder Applications > Utilities) and issue the command man changeip.  You'll see something like this:
    $ man changeip
    changeip(8)               BSD System Manager's Manual              changeip(8)
    NAME
         changeip -- Change service configuration files with hard-coded IP addresses
    SYNOPSIS
         changeip [-v] [-d path] old-ip new-ip [old-hostname new-hostname]
         changeip -checkhostname
         changeip -h
    DESCRIPTION
         changeip is used to manually update configuration records when a server's IP address or hostname changed in a way that affected services were unable to properly process, for example when the server is behind a NAT device and the WAN identity changed.  ...
    Given your response and your concern, consider creating a backup of your disk.  Shut down, boot the installation DVD, and use Disk Utility (from the Utilities menu) in the second screen of the installation process to copy your disk contents to an external storage device.  (Time Machine isn't as good at getting a backup of a server as is a clean backup created while shut down.)  There are descriptions around that detail how to create this backup using Disk Utility.
    There is no DNS server implemented in the Airport Extreme.  The Airport Extreme forwards DNS requests to a DNS server elsewhere.  Few gateway devices contain DNS servers; that these devices request a DNS address tends to be confusing, too.  That address is solicited from the user for use in the DHCP server that many of the available gateway devices provide.
    There is no need for a DNS forwarder, particularly if your server is configured for your LAN.  (Adding a forwarder adds another hop into the whole translation process.  That configuration and that extra hop can be useful when the intermediate DNS server is providing specific, enhanced DNS-related functions, such as security monitoring and logging, or providing a "nanny filter" mechanism.)
    If you are running DNS services on your LAN, then your Airport Extreme DHCP server should be configured to pass out the IP address of your DNS server.
    It would appear that your local box has the default self-hosted DNS, and is not configured to serve LAN DNS (other than for itself).  That's good.  Accordingly, it'll likely be getting good DNS from itself, but will not be getting translations for other hosts on your network.  That's not so good.  When DNS responses are not available, you'll get DNS-level timeouts, and those are usually around 30 seconds each.
    Check your server logs for messages related to the failed connections, and check the Windows file service logs for any errors being generated by the file service.  The log information is most easily available from Console.app, which is a utility in Applications > Utilities folder, or from the Server Admin tool (Applications > Server folder) for DNS, and for the file server component.
    The above is probably going to read like a wall of unfamiliar jargon, so please ignore this and my previous response here, and I'll leave it to somebody else to assist you here.

  • TS4001 Anybody having problems accessing Adwords Exspress login with Safari ?

    Anybody having problems accessing Adwords Exspress login with Safari ?

    Hi jhankins,
    There was a problem yesterday for a brief half an hour to 1 hour, please let us know if you are still facing that issue.
    -Ankit

  • Equium A100-027 PSAAQ - having problems accessing Internet with WLan

    Just installed WXP on my Equium A100-027 (PSAAQ) as Vista did not like. Now am having problems accessing Internet. What drivers do I need to download and how do I install them?
    Thanks.

    Hi,
    I would suggest you to check the driver site of toshiba
    -> http://eu.computers.toshiba-europe.com/cgi-bin/ToshibaCSG/download_drivers_bios.jsp
    search for your machine and download the wlan drivers. If you dont know which one you need just download all of them and install em, one of that drivers MUST work. ;)
    Greets

  • Setting up access points for public access

    Okay, here's the situation. I have a PowerMac G4/1.25GHz dual processor running Server X 10.3.9 with four Mac clients (a small law office). Up until recently, everyone had also been running (client) 10.3.9, but I started upgrading some of them to 10.4 (currently 10.4.5). When I did this, they started running into problems with Word sometimes giving a "network or file permission error" when attempting to save documents to the server. After weeks of posting questions to Word support and trying everything in the book that I could think of, I found Apple recently posted what appears to be the answer to this (article 302979, "Microsoft Office applications fail to save to a server volume." The problem? I have all four users logging into the same account on the server, and when one of them logs out, it zaps everything in a Microsoft-created temp folder on the server, including temp files created by open documents created by other clients. Sheesh.
    I had everyone set to use the same account because they have no need of document security -- everyone should be able to get into everyone else's files on the server, period. So, because of this snafu, I've created separate accounts for each of the users. My problem now is that, if user "X" creates a file or folder on the server, user "Y" cannot modify it because it is created as read-only. Strangely, if someone modifies an existing file, it doesn't change the user rights at all -- not sure why.
    I'll admit to being a bit of a novice with Server X but am familiar with parent/child folder permissions -- I think I've got everything set right, but I must obviously be missing something. Here's what I've got setup, and what I've tried. If anyone can point out how I've got this setup improperly, I really need to get this fixed... thanks.
    I have a single sharepoint ("workfiles"). I used the "public" folder as an example, and set the owner to "root" and the group to "staff". Further, I set the owner, group and everyone privileges to "read & write". I've also tried setting the group to "admin". All the individual user accounts I've set are also setup as admin users. I've tried setting each users's primary group as "staff (20)" or "admin (80)". I've copied all these privileges to all enclosed items, which does reset everything to public access, but as soon as someone creates a new folder or file, that folder/file becomes private to that user (it shows up with the creator's username as "owner" (r&w), group as "admin (read-only), and others as "read-only" as well.
    PS: If upgrading the server to Server X 10.4 would help, I'm sure I can arrange that.

    In our law firm, the server (10.4.4), we have set access to read/write access so staff can open client files/folders, edit then and close, etc. That seems to be working okay. Before the tech worked on permissions, if someone created a letter another staff member could open it, but it was read-only.
    The problem we are having is that if a file that is clicked on stationery pad and we want to edit it, it will not allow us to. For example, if we need to edit our letterhead that normally comes up as an untitled document, if I unclick the stationery pad box, it unclicks, but it still comes up as an untitled document. I even tried to unclick a stationery pad on a document that I created before the server upgrade and it wouldn't let me.
    If I create a brand new document and put it on stationery pad, it comes up untitled as it should. If another user on another desktop wants to make changes, they unclick the stationery pad box, but when they open it, it comes up untitled and in checking get info, the stationery pad is selected.
    The tech set it up as follows:
    Share Points and All tabs:
    General tab: box to share this item and its contents is clicked
    Access tab: owner, group and everyone have read/write privileges
    If select dial at bottom to propagate permissions, all boxes are checked, except for access control list, which is shaded.
    I cannot drag/add anything to the control list and the pencil and the minus sign is shaded
    Protocol tab: Both boxes, share item using AFP and Allow AFP guest users are clicked. But for better security in reading the article, this should be unchecked.
    Also under the protocol tab: the inherit permission from parent radio dial is clicked, not the use standard POSIX behavior.
    What are we missing?
    Thanks, Cheryl

  • XSLT bug with attributes+in memory DOM

    Hello,
    I know there was a thread about this one some time ago but i
    don't know the current state of this matter, so :
    The XSLT processor has problems with attributes when the DOM was
    build dynamically (attributes are returned as being empty). When
    i save the same DOM, reload it and then do the transform
    attributes are properly transformed.
    The Version 2.0.0.1 of the Java parser states to have solved a
    problem when accessing attributes (bug #920536) but this seems to
    be an other one (i tried 2.0.0.0 and 2.0.0.1 and both had this
    problem).
    Bye Heiko.
    null

    We were unable to reproduce the problem you illustrated. We got
    the output:
    <HTML>
    <BODY>
    the value is : 1
    </BODY>
    </HTML>
    irrespective of whether the lines were commented out. Can you
    describe your environment - JRE/JDK, OS. etc?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    You wrote:
    : Hello,
    : the following program illustrates what i mean :
    : package testing;
    : import oracle.xml.parser.v2.*;
    : import org.w3c.dom.*;
    : import java.io.*;
    : public class XMLTest {
    : public static final void main(String [] args) throws
    : Exception {
    : XMLDocument doc=new XMLDocument();
    : doc.setVersion("1.0");
    : doc.setStandalone("yes");
    : Node root=doc.createElement("ROOT");
    : Node att=doc.createAttribute("value");
    : att.setNodeValue("1");
    : root.getAttributes().setNamedItem(att);
    : doc.appendChild(root);
    : doc.print(new FileOutputStream("c:\\test.xml"));
    : DOMParser parser=new DOMParser();
    : parser.parse(new FileInputStream("c:\\test.xml"));
    : doc=parser.getDocument();
    : XSLStylesheet xsl=new XSLStylesheet(new
    : FileInputStream("c:\\test.xsl"), null);
    : XMLDocument out=new XMLDocument();
    : out.appendChild(new XSLProcessor().processXSL(xsl,
    doc));
    : out.print(System.out);
    : with the stylesheet test.xsl as follows :
    : <?xml version="1.0"?>
    : <xsl:stylesheet
    : xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
    : xmlns="http://www.w3.org/Profiles/xhtml1-transitional"
    : default-space="strip"
    : indent-result="yes"
    : >
    : <xsl:template match="ROOT">
    : <HTML>
    : <BODY>
    : the value is : <xsl:value-of select="@value"/>
    : </BODY>
    : </HTML>
    : </xsl:template>
    : </xsl:stylesheet>
    : if you run the program as given the result is :
    : the value is:
    : but when you uncomment the lines storing & retrieving the
    : document the result is as i would expect it :
    : the value is: 1
    : Bye Heiko.
    null

  • Public Access Wi Fi

    My new iTouch works fine at home accessing my local Apple/Airport network. However, I live in New York City and when I'm away from home and a public access Wi Fi appears on my display and Wi Fi is shown as 'On', I cannot access the internet. I get an error message 'cannot access mail.com'. Someone told me some public access Wi Fi systems are only compatible with PCs. Anyone else having trouble accessing Wi Fi when away from home? Thanks.

    Not all detectable Wi-Fi networks are free. Some are locked, meaning you need a password to connect to the network. Some are open (not locked) but still require you to enter login into, or agree to terms of use, before you can connect to the internet. For those, you need to launch Safari and go to a 'common' page (e.g. google.com, cnn.com); you are re-directed to the network's front page. For example, this is the case for free Wi-Fi at Panera Bread, the local library, etc.
    Also, in some cases, the open network requires use of a proxy server, and if you don't have that information, you cannot connect to the internet, even though your are connected to the WiFi network.
    Hope this helps...

  • LDAP Attribute for POP3 access

    Dear folks,
    In SUN JES subscriber LDAP information, is there any LDAP subscriber LDAP attribute that indicates the subscriber having access to POP3?
    If there is, what kind/type of value can it be ?
    Thanks,
    T Dang

    Hi,
    For future reference, please always provide the version of messaging server you are using. (./imsimta version)
    With regards to your question, POP access is provided unless it is denied (assuming that POP daemon is enabled). Is there a user who is being denied and you are trying to work out why?
    The LDAP attribute which restricts access to POP/IMAP/HTTP access of the store is mailallowedserviceaccess
    Regards,
    Shane.

Maybe you are looking for