com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
2007-10-28 09:13
459 查看
2007年06月21日 18:29:00
com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
![](http://www.bitfx.org:800/skins/default/filetype/zip.gif)
点击浏览该文件
仿照Apache开源项目org.apache.commons.beanutils(java)的.net版本,实现实体类的一些简化操作(比如实体类的复制,动态赋值,取值),提供动态实体类型,动态实体类,动态属性。
计划下一步实现对一些复杂对象的动态实体类的封装(比如DataReader,DataTable等)。实现其与动态实体类的转化操作,以及和自定义的静态实体类的转化操作(这个是org.apache.commons.beanutils没有支持的)。
点击下载源代码
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
测试代码:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System.Collections.Generic;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System.Text;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using com.qsoft.commons.beanutils;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System.Data;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
namespace test_beanutils
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
class Program
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
static void Main(string[] args)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
testclone();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
testDynaBean();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
testDataRow2Bean();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.ReadKey();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static void testDataRow2Bean()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine("测试动态DataTableUtil:");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
DataTable dt = new DataTable();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
dt.Columns.Add("id", typeof(int));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
dt.Columns.Add("name", typeof(string));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
DataRow row = dt.NewRow();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
row["id"] = 100;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
row["name"] = "Kimm King";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
object obj = DataTableUtil.dataRow2Bean(row, typeof(MyBean));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine(obj);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static void testDynaBean()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine("测试动态Bean:");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
DynaProperty[] property = ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
new DynaProperty("id", typeof(string)),
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
new DynaProperty("name", typeof(string)),
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
new DynaProperty("email", typeof(string))
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
BasicDynaClass clazz = new BasicDynaClass("bean", null, property);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
BasicDynaBean bean = new BasicDynaBean(clazz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//bean.set("qq", "100");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
bean.set("id", "100");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
bean.set("name", "Kimm King");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
bean.set("email", "KimmKing@163.com");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine(bean);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static void testclone()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine("测试Bean的clone:");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MyBean mb1 = new MyBean();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
mb1.id = 100;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
mb1.name = "Kimm King";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MyBean mb2 = (MyBean)BeanUtils.cloneBean(mb1);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine(mb2);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public class MyBean
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private int _id;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public int id
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
get ...{ return _id; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
set ...{ _id = value; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private string _name;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public string name
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
get ...{ return _name; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
set ...{ _name = value; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public override string ToString()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return "MyBean[id=" + _id.ToString() + ",name=" + _name + "]";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
1 承诺:首先给你美好的前景描述。一般都是口头上的。给你画一个大饼。
2 模糊其词的权责:就是对于下一步的事情,可能的问题都不告诉你,让你不确定是否有问题。
3 工作:凡是在签订协议或是(无协议或特殊工作类型)无订金情况下,要求试着做,先做一部分的都是骗子的典型特征。
4 合同:严重不公平或是直接违法。正确的合同应该是权责分明的,双方的权力与责任都明确,平等公正,没有歧义。严重偏向一方的合同都不能签。要详细的看每一个条款。对未来可能出现问题的任何一条都不要妥协。凡是以一个不存在的团体为合同一方的都是非法的。
5 付款:根据经验,凡是工作完成后多少时间(比如一个月等)付款的都是骗子。合法的公司或单位做一件事不会付不起钱,在正规的手续下一般是订金-》完成时付余款。双方有过合作关系相互充分信任的情况下才可以不预付订金。否则可能被骗,或是引起纠纷。
6 证据:整个过程中,凡是涉及到合作的东西都别用口头上的联系。最好都用email,至少也要用vmsn之类的,保留下来证据,万一引起纠纷这个可以是决定性的东西。对方口头上给你一个额外的任务或是某个承诺,告诉他重新在email里发给你。
7 证件:一定要看对方的证件,对于团体还要看执照。网络是虚拟的,我们在明处,骗子在暗处,你必须要知道对方是谁,才能降低风险。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1661070
com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
![](http://www.bitfx.org:800/skins/default/filetype/zip.gif)
点击浏览该文件
仿照Apache开源项目org.apache.commons.beanutils(java)的.net版本,实现实体类的一些简化操作(比如实体类的复制,动态赋值,取值),提供动态实体类型,动态实体类,动态属性。
计划下一步实现对一些复杂对象的动态实体类的封装(比如DataReader,DataTable等)。实现其与动态实体类的转化操作,以及和自定义的静态实体类的转化操作(这个是org.apache.commons.beanutils没有支持的)。
点击下载源代码
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
测试代码:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System.Collections.Generic;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System.Text;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using com.qsoft.commons.beanutils;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
using System.Data;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
namespace test_beanutils
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
class Program
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
static void Main(string[] args)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
testclone();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
testDynaBean();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
testDataRow2Bean();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.ReadKey();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static void testDataRow2Bean()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine("测试动态DataTableUtil:");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
DataTable dt = new DataTable();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
dt.Columns.Add("id", typeof(int));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
dt.Columns.Add("name", typeof(string));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
DataRow row = dt.NewRow();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
row["id"] = 100;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
row["name"] = "Kimm King";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
object obj = DataTableUtil.dataRow2Bean(row, typeof(MyBean));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine(obj);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static void testDynaBean()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine("测试动态Bean:");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
DynaProperty[] property = ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
new DynaProperty("id", typeof(string)),
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
new DynaProperty("name", typeof(string)),
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
new DynaProperty("email", typeof(string))
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
BasicDynaClass clazz = new BasicDynaClass("bean", null, property);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
BasicDynaBean bean = new BasicDynaBean(clazz);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
//bean.set("qq", "100");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
bean.set("id", "100");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
bean.set("name", "Kimm King");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
bean.set("email", "KimmKing@163.com");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine(bean);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static void testclone()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine("测试Bean的clone:");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MyBean mb1 = new MyBean();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
mb1.id = 100;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
mb1.name = "Kimm King";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
MyBean mb2 = (MyBean)BeanUtils.cloneBean(mb1);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine(mb2);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Console.WriteLine();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public class MyBean
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private int _id;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public int id
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
get ...{ return _id; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
set ...{ _id = value; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private string _name;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public string name
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
get ...{ return _name; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
set ...{ _name = value; }
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public override string ToString()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return "MyBean[id=" + _id.ToString() + ",name=" + _name + "]";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
1 承诺:首先给你美好的前景描述。一般都是口头上的。给你画一个大饼。
2 模糊其词的权责:就是对于下一步的事情,可能的问题都不告诉你,让你不确定是否有问题。
3 工作:凡是在签订协议或是(无协议或特殊工作类型)无订金情况下,要求试着做,先做一部分的都是骗子的典型特征。
4 合同:严重不公平或是直接违法。正确的合同应该是权责分明的,双方的权力与责任都明确,平等公正,没有歧义。严重偏向一方的合同都不能签。要详细的看每一个条款。对未来可能出现问题的任何一条都不要妥协。凡是以一个不存在的团体为合同一方的都是非法的。
5 付款:根据经验,凡是工作完成后多少时间(比如一个月等)付款的都是骗子。合法的公司或单位做一件事不会付不起钱,在正规的手续下一般是订金-》完成时付余款。双方有过合作关系相互充分信任的情况下才可以不预付订金。否则可能被骗,或是引起纠纷。
6 证据:整个过程中,凡是涉及到合作的东西都别用口头上的联系。最好都用email,至少也要用vmsn之类的,保留下来证据,万一引起纠纷这个可以是决定性的东西。对方口头上给你一个额外的任务或是某个承诺,告诉他重新在email里发给你。
7 证件:一定要看对方的证件,对于团体还要看执照。网络是虚拟的,我们在明处,骗子在暗处,你必须要知道对方是谁,才能降低风险。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1661070
相关文章推荐
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- com.qsoft.commons.beanutils源代码(.net版本的org.apache.commons.beanutils)
- org.apache.commons.beanutils包 BeanUtils、 MethodUtils、 PropertyUtils