Sarah - conquering said: Japan's first announced, the company has developed a new DVD disc that makes the main material of the disc is plastic synthesized from the starch from the corn. Although I have not yet been determined to invest in bulk production and listed sales, the amount of oil and discharged carbon dioxide consumed at the time of production, so the company will "protect the green DVD" propaganda slogan of "protecting the environment." Extension to all relevant companies.
According to Japanese Common Society, the main component of the DVD disc is made to extract and synthesized from plant raw materials. This technology has gradually been applied in the fields of the mainframes of the computer, but it is difficult to use for the production of DVD discs due to its non-high temperature.
Japanese companies successfully developed a new type of material that can be used indoors and highest resistance to 55 degrees. Although this material cost is equivalent to about 3 times the current market, for the promotion of the product is unfavorable, the company is confident that "the product can be applied to the CD and the new generation of DVD."
Novrain - Sth in the Way said: Maize refining, should be able to eat sarah - conquering said: DVD does not want to see, still go to the pot, boil, huh ... novrain - str in the Way : Yes, throw it into the oven to roast it. Very fragrant sarah - conquering said: ftnovrain - sth in the Way said: There is a problem, Hibernate does not have an automatic update horse, if that field is empty he update to DB Sarah - Conquory said: You can set the not updated to Nullnovrain - Sth in the Way said: The persistance here is hand-speaking SQL, and if you want to have no judgment sarah - conquering said: will be wrong Sarah --Conquering said: Why not use prepared statement? Novrain - Sth in the Way said: Day knows, can preparedstat? Sarah - conquering said: First, Judgment, and then fill Novrain - Sth in the Way said: When empty, how to fill in sarah - conquering said: Do not fill Novrain - Sth in the Way: That is not the same Novrain - Sth in the Way: sb.append ("Update TNP_Trackable"); sb.append ( "SET TNP_GROUP_ID ="); sb.append (group_id);
SB.Append (", carr_type_id ="); sb.append (", auto_shutdown_Hour ="); sb.append (auto_shutdown_Hour); sb.append (", phone_model_id ="); sb.append (DBUTIL.TOVALUE (Phone_Model_ID));
Sarah - conquering said: This is called Hibernate? Novrain - Sth in The Way said: Not A, no sarah - conquering said: Then, then, then fill Novrain - Sth in the Way said: if (...! = Null) {novrain- -Sth in The Way said: Ann Append? Sarah - conquering said: Well, otherwise SQL will report the error Novrain - Sth in the Way said: Is there a better way, one Yiyi Novrain - Sth in the Way said: Value is a basic type, yet not yet The official, roasted Sarah - conquering said: Use hibernatesrah - conquering: Basic style Sarah - conquering said: give the preset value Novrain - Sth in the Way said: Who knows that it is 0 times I want to save 0 or not sarah - conquory says: That is -1novrain - str in the Way said: Who knows that it is -1, I want to save 0 or not Novrain - str in the Way said: Who knows It is not to save -1 when it enters -1.
Sarah - conquering said: That is if (...! = Null) {
Novrain - Sth in The Way said: Oh, in short, this is not a way, frame, I want you sarah - conquering said: In fact, it is best to use packaging class transmission parameters sarah - conquering said: Even if it is still Default Sarah - Conquering said: or at least String type transmission parameter sarah - conquering said: / ** * Update a po * @Param Templ * @Throws HibernateException * @Throws java.lang.exception * / public void updateTemplate (Template templ) throws HibernateException, Exception {Transaction transaction = null; Session session = sessionFactory.openSession (); try {transaction = session.beginTransaction (); session.update (templ); transaction.commit (Sarah - Conquering said :} Catch (HibernateException HE) {IF (Transaction! = Null) {Transaction.rollback ();} throw he;} finally {session.close ();}
Novrain - Sth in the Way said: Well, how to do it before, forgot sarah - conquering said: Hibernate does not do sarah - conquering said: This is the code I have written to update a record code, is Not very cool? Novrain - Sth in the way: 妒 阿 sarah - conquering said: Your system efficiency is estimated to be high, so it is unlikely to use Hibernatenovrain - Sth in the Way: If you need to update several fields How sarah - Conqueering said: If you have to fight, there is no way Novrain - Sth in the Way said: Hibernate is not a problem Sarah - conquering said: What is the problem Novrain - Sth in the Way said: To update two fields Update all fields There may be 50 Sarah - conquering said: Will not, hibernate will finally convert to the SQL statement to execute the necessary updates, it knows those who want to change Novrain - Sth in the Way said: That is to say before he update Sarah - conquering said: He has a very good caching mechanism Novrain - Sth in the way says: No matter what he wants to check, Sarah - Conquory: An updated object must be in a hibernate Sarah - conquering said: So there will be a fixed code mode Sarah - Conquering said: Transaction Transaction = null; session session = sessionFactory.opensession (); try {transaction = session.begintransaction (); session . Save (Templ); Transaction.commit ();} catch (hibernateException he) {i (transaction! = null) {Transaction.rollback ();} throw he;} finally {session.close ();} sarah-- Conquory said: Transaction Transaction = Null; session session = sessionFactory.opensessi ON (); try {transaction = session.begintransaction (); ... transaction.commit ();} catch (hibernateException he) {i (transaction! = null) {i (transaction! = null);} throw he;} finally {Session.close ();} Novrain - Sth in the Way said: This Templ is already found out Sarah - conquering said: in transaction.commit (); time to check sarah - conquering said: then Update,