摘要:
vo和po的主要区别在于:Ø vo是独立的java object。Ø po是由hibernate纳入其实体容器(entity map)的对象,它代表了与数据库中某条记录对应的hibernate实体,po的变化在事务提交时将反应到实际数据库中。
......
摘要:
好几次,在java中用相对路径打开文件,都报找不到文件的错误,改成绝对路径后正常。今天准备检查一下,相对路径到底应该怎么写。
测试代码:public class testfilepath {? public static void main(string[] args) {??? testfilepath testfilepath1 = new testfilepath();??? file ......
获得本机IP和名称
//iplabel.javaimport java.awt.*; 【程序编程相关:
设置代理服务器】import java.net.*; 【推荐阅读:
weblucene的部署和解错】{ 【扩展信息:
在SP公司打工,服务器端技术很重要】import javax.swing.*;
public class iplabel
jframe frame;jlabel label1,label2;jpanel panel;string ip,address;
public void getip()
{try{inetaddress addr = inetaddress.getlocalhost();ip=addr.gethostaddress().tostring;//获得本机ipaddress=addr.gethostname()tostring;//获得本机名称
//system.out.println("addr=:"+string.valueof(addr));}catch(exception e){system.out.println("bad ip address!"+e);} }
...
下一页 摘要:
hibernate的加锁模式有:Ø lockmode.none : 无锁机制。Ø lockmode.write :hibernate在insert和update记录的时候会自动获取。Ø lockmode.read : hibernate在读取记录的时候会自动获取。以上这三种锁机制一般由hibernate内部使用,如hibernate为了保证update过程中对象不会......