I usually use a classes destructor method __destruct() to persist objects to session or what have you. It is just very convinient, but I'm curious to if there are any other methods that are equally appealing. Do you know of such?
The curiousity arose as I was to merge/utilize two frameworks that both made use of __destruct() for persist...
I have a small application which allows users to create accounts and then award 'points' to each other. UserAccount is an object, and so is Point, and there is an aggregation relationship between them: each UserAccount has a member variable (PointHistory) which is a collection of Points.
The Point object simply contains properties for w...
I have a simple entity, Code, that I need to persist to a MySQL database.
public class Code implements Serializable {
@Id
private String key;
private String description;
...getters and setters...
}
The user supplies a file full of key, description pairs which I read, convert to Code objects and then insert in a singl...
I have a JPA entity instance in the web UI layer of my application. I'd like to know at anytime if this entity has been already persisted in database or if it is only present in the user session.
It would be in the business layer, I would use entitymanager.contains(Entity) method, but in my UI layer I think I need an extra attribute ind...
If a user accesses:
user/register?destination=node/add/listing
And they then click on "Log In" or "Request New Password" tabs, it WONT keep the destination parameter in the address bar. I.e. After clicking on "Log in" and logging in, the user won't actually end up at:
node/add/listing
I thought of editing the core user module, but ...
I decided to use the singleton design pattern while creating a view helper class. This got me thinking; will the singleton instance survive across requests? This led to another question, Which variables (if any) survive across web requests and does that change depending on deployment? (Fastcgi, Mongrel, Passenger, ...)
I know that Con...
We want to persist some user settings int he GUI part of our code. I used to do Win32 programming exclusively and the typical way this was done was with registry settings.
I assume that this should be done with configuration files, but was wondering if there was a library or cross platform wrapper that made key/value pair persistence v...
When using repository based persistence in a .net application, which collection type should normally be used?
IList, IEnumerable?
For example, the FindAll() method.
...
Create Table A (
ID varchar(8),
Primary Key(ID)
);
Create Table B (
ID varchar(8),
A_ID varchar(8),
Primary Key(ID),
Foreign Key(A_ID) References A(ID)
);
Given that I have created two tables using the SQL statements above, and I want to create Entity classes for them, for the class B, I have these member attributes:
@Id
@Column(name...
Hi
i try to add persistance to my workflow using sql service persistance and all i know is how to add Persistence Service to the Workflow Runtime using code in the host app or web.config file.i my case i have WF as a webservice so i add to my Web.config this code:
<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersist...
Why does JPA require a no-arg constructor for domain objects ?
I am using eclipselink and just got this exception during deployment.
Exception [EclipseLink-63] (Eclipse Persistence Services-1.1.0.r3639-SNAPSHOT):
org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The instance creation method
[com.me.model...
Hello,
Is it possible to save some fields in the program, or do I have to write them to a file?
Example:
1) I open a file (with OpenFileDialog) and put it in a FileInfo
2) close the program
3) restart the program
4) go to open -> recent -> select the previous File
Thanks
...
Hi there!
Here's the deal. I've got index.php which links to an internal JS file in it's header.
index.php then includes another .php file, which outputs this: + add file. addFile() is a Javascript function defined in the external JS file.
By doing this nothing happens, the included php does not "see" the JS function. Encapsulating the...
I want to know that how can I persist the divs dropped on a draggable. I have been trying since long but stuck at this point. Actually you can see the demo here. I have to save the user designed wedding floor. So whenever user logins next time he/ she is able to see the last design saved. The code is shown below:
...
I use the following code to update an object from servlet in Google App Engine :
String Time_Stamp=Get_Date_Format(6),query="select from "+Contact_Info_Entry.class.getName()+" where Contact_Id == '"+Contact_Id+"' order by Contact_Id desc";
PersistenceManager pm=null;
try
{
pm=PMF.get().getPersistenceManager();
// note that this re...
I have a Quartz job that has already been scheduled. I want to update the JobDataMap associated with it. If I get a JobDataMap with JobDataMap jobDataMap = scheduler.getJobDetail(....).getJobDataMap(), is that map "live"? ie. if I change it, will it be persisted in the scheduler? If not, how do I persist it?
...
I'm trying to use PowerShell with SharePoint. I'd like my PowerShell scripts to load my SharePoint farm configuration from files rather than either hard coding the configuration in the scripts, or having to pass in the same parameters each time.
This the kind of information I need to store.
WebFrontEnds: Web1, Web2, Web3
CentralAdmin:...
I am not able to get child entities to load once they are persisted on Google App Engine. I am certain that they are saving because I can see them in the datastore. For example if I have the following two entities.
public class Parent implements Serializable{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Extension...
I want to allow my user to store custom phrases, to be displayed in an editable UITableView.
What's a quick and dirty to store these strings?
I'm fairly new at iPhone development. I know about Core Data, but not how to use it. i would stay away form that just for this particular project if possible. Are PLIST files a possibility here?...
hi , i'm using Netbeans 6.8 and build simple Maven web application project.
create Entity and main file for persist Entity [also create persist unit] and use EclipsLink.
but when i run main file get this error :
Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Persistence
at Main.main(Main.java:34)...