WEB开发网
开发学院软件开发Java 开源面向对象数据库 db4o 之旅,第 2 部分: db4o ... 阅读

开源面向对象数据库 db4o 之旅,第 2 部分: db4o 查询方式

 2010-04-01 00:00:00 来源:WEB开发网   
核心提示: 清单1. People 对象packagebo;publicclassPeople{privatejava.lang.Integer_id;privatejava.lang.String_name;privatejava.lang.String_address;privatejava.util.

清单1. People 对象

package bo; 
 
public class People { 
 
 private java.lang.Integer _id; 
 private java.lang.String _name; 
 private java.lang.String _address; 
 private java.util.List<AutoInfo> _autoInfoList; 
 
 public java.lang.Integer getId() { 
 return _id; 
 } 
 
 public void setId(java.lang.Integer _id) { 
 this._id = _id; 
 } 
 
 public java.lang.String getName() { 
 return _name; 
 } 
 
 public void setName(java.lang.String _name) { 
 this._name = _name; 
 } 
 
 public java.lang.String getAddress() { 
 return _address; 
 } 
 
 public void setAddress(java.lang.String _address) { 
 this._address = _address; 
 } 
 
 public java.util.List<AutoInfo> getAutoInfoList() { 
 return this._autoInfoList; 
 } 
 
 public void addAutoInfo(AutoInfo _autoInfoList) { 
 if (null == this._autoInfoList) 
  this._autoInfoList = new java.util.ArrayList<AutoInfo>(); 
 this._autoInfoList.add(_autoInfoList); 
 } 
 
} 

AutoInfo 对象清单2:

清单2. AutoInfo 对象

package bo; 
 
public class AutoInfo{ 
 
 private java.lang.Integer _id; 
 private java.lang.String _licensePlate; 
 private bo.People _ownerNo; 
 
 public java.lang.Integer getId () { 
 return _id; 
 } 
 
 public void setId (java.lang.Integer _id) { 
 this._id = _id; 
 } 
 
 public java.lang.String getLicensePlate () { 
 return _licensePlate; 
 } 
 
 public void setLicensePlate (java.lang.String _licensePlate) { 
 this._licensePlate = _licensePlate; 
 } 
 
 public bo.People getOwnerNo () { 
 return this._ownerNo; 
 } 
 
 public void setOwnerNo (bo.People _ownerNo) { 
 this._ownerNo = _ownerNo; 
 } 
 
} 

上一页  1 2 3 4 5 6 7 8  下一页

Tags:开源 面向 对象

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接