persistence

Why are persisted user settings not loaded?

I have a windows application that uses an assembly that stores some configuration settings in the default application settings. The settings can be changed in run time and are persisted thus: Properties.Settings.Default.SelectedCOMPort = options.SelectedCOMPort; Properties.Settings.Default.Save(); The settings are saved correctly and...

How to restore the user-location in a drill down UITableViewController structure?

I have a CoreData model that contains Levels which can again contain childLevels. I represent each level with a UITableViewController listing all childLevels. When a user taps a row a new UITableViewController is pushed onto the navigationController. No problem here. How would I go about storing the user location within this table str...

Java Data Persistence without Enterprise Server?

What solutions exist to persist data, without requiring a full-blown enterprise server? I am fairly new to Java. At uni the whole curriculum was based on Java, so I coded a bit already. But it never went into depth with the available frameworks. The only way we actually touched on persistens was using "vanilla" JDBC connections. I've do...

Keep all entities in one ejb module

There are few applications that use java persistence. Each application has its own set of entities that represents the same tables in DB. For instance, application A has entities for Table1, Table2, etc; at the same time, application B also has entities for Table1, Table2, etc. Instead of that I want to create a new EJB module with 1 b...

JPA PreUpdate implemented using DescriptorEventAdapter called after find/select

I have implemented a DescriptorEventAdapter for JPA (eclipselink). It performs simple timestamp operations. The preUpdate method is being called, however it is being called too often. It gets called and updates the timestamp, even on find/select operations. The issue I'm running into appears to occur in a different JPA framework also, h...

File resource persistence in PHP

I'm developing a simple chat web application based on the MSN protocol. The server communicates with the MSN server through a file resource returned from fsockopen (). The client accesses the server via XMLHttpRequest. The server initially logs in, and prints out the contact list (formatted in an HTML table) which the client receives thr...

JPA/Hibernate, @Embedded and Enum

Hi, I'm trying to persist an Enum as an Embedded value (ideally using it's String representation, but even ordinal would be ok right now) The Enum: @Embeddable public enum DayOfTheWeek { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY; public int toCalendar() throws EnumConstantNotPresentException{ switch (this) { ...

Hibernate Reference column in table to indicate how to unmarshall an attribute in a different column in the same table

Hi, I have an entity that I want to persist through Hibernate (3.2) The EntityBean has a column that indicates how another value of the entity bean should be unmarshalled: <class name="ServiceAttributeValue" table="service_attribute_value"> <cache usage="nonstrict-read-write"/> <id name="id" column="id" type="int-long"> ...

JDO - List of Strings not being retrieved from database

On my User class I have a field that is a list of strings: @Persistent private List<String> openIds; When I create a new user I do this: User user = new User(); user.openIds.add(openid); pm.makePersistent(user); When I break after that last line and look, the openIds contains the openid I put in there. But, when I later call User u...

Asp.Net View State persisted?

Is it a good idea to persist all ViewStates of the Intranet in a Memcached or directly in file on the server like this article show? I usually see it directly in pages but a lot of our pages (Intranet website for clients) have huge DataGrid (can make the page up to 2 megs). Is it a good way to have smaller page? Any problem that you ca...

iPhone app view persistence

Hi, I am having trouble finding some information on persistence in iPhone apps. I am creating a tab based - navigation based app and want the application to save the current location when the app quits. For example if the user is in tab 1, several tiers into the navigation controller and the app quits, I would like the app to load up in...

Persistence of checkbox data from 5-page html table display

I'm a PHP learner. I am pulling rows from a db and displaying them in a very simple HTML table. Each row begins with a checkbox. There are 20 records on each page, and there are 5 pages. Every time I go to the "next page", the values in the $cVarString below are vacated. No page-to-page persistence. If I choose 10 rows on one page ...

hashmap in persistence manager

so I am trying to build a google app engine using servlets, filters etc. I have a java file that looks something like: public class Idea implements Comparator<Idea> { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private User author; @Persistent private String content; @Persistent ...

Prevent a console app from closing when not invoked from an existing terminal?

There are many variants on this kind of question. However I am specifically after a way to prevent a console application in Python from closing when it is not invoked from a terminal (or other console, as it may be called on Windows). An example where this could occur is double clicking a .py file from the Windows explorer. Typically I ...

Where in the filesystem do I store app's data files?

I need to store some data files for my blackberry app. These are usually small png files that I download and store locally for performance reasons. Also I need to store an xml file locally. My question is where are these files supposed to be saved on a blackberry? Is there such a thing as an application's home folder or settings folder ...

Is there anyway to populate a UITableView with an array but persist checkmarks?

Hello all, I have an app that has a tab bar, each tab contains a separate table. The first table uses core data to persist its entries and checkmarks. The second table on the second tab uses an NSMutableArray to populate it (I would use core data but I would have to pre populate it and this table does not allow that) I would like to per...

How to persist a checkmark with a table populated by a plist?

Hi all, I have an app where when the user taps on a cell I would like for a check mark to appear and be persisted. So far this is my code. -(void)viewDidLoad { [super viewDidLoad]; NSString *path = [[NSBundle mainBundle] pathForResource:@"AirportList" ofType:@"plist"]; NSMutableArray *airArray = [[NSMutableArray alloc] initWithContent...

Persisting 3rd party objects with JPA

Hi everyone, In my current project I am using a 3rd party library which has no JPA annotations. Can I persist objects from that library using JPA and external mappings? Can you recommend a good example? So far I only found information on external XML-Mappings and JPA in the JSR220 spec which mostly states the structure of the mappings....

Persisting non-entity class that extends an entity (jpa) - example?

The JPA tutorial states that one can have a non-entity that extends entity class: Entities may extend both entity and non-entity classes, and non-entity classes may extend entity classes. - http://java.sun.com/javaee/5/docs/tutorial/doc/bnbqa.html Is it possible to persist such structure? I want to do this: @Entity abstract...

What functionality to build into business objects?

What functionality do you think should be built into a persistable business object at bare minimum? For example: validation a way to compare to another object of the same type undo capability (the ability to roll-back changes) ...