使用netbeans生成Hibernate DAO

时间:2016-03-26 18:31:19

标签: hibernate netbeans

我在我的网络应用程序中使用public class ContactsListAdapter extends ArrayAdapter<User> { private Context context; private List<User> contacts; public ContactsListAdapter(Context context, List<User> contacts) { super(context, R.layout.contact_list_item); this.context = context; this.contacts = contacts; } @Override public View getView(int position, View convertView, ViewGroup viewGroup) { User contact = contacts.get(position); View contactView = convertView; if (contactView == null) { LayoutInflater inflater = (LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE); contactView = inflater.inflate(R.layout.contact_list_item, null); } TextView contactEmail = (TextView)contactView.findViewById(R.id.contact_item_email); contactEmail.setText(contact.getEmail()); TextView contactPhone = (TextView)contactView.findViewById(R.id.contact_item_phone); contactPhone.setText(contact.getPhone()); return contactView; } 框架。我曾使用hibernateDAO生成eclipse个文件。但是在hibernate tool IDE中,我没有看到像{eclipse这样的netbeans(8.0) DAO文件。这是我在netbeans中看到的窗口 是否有第三方库在netbeans中生成DAO文件?
netbeans hibernate panel

1 个答案:

答案 0 :(得分:0)

您可以直接在netbeans中生成实体对象,无需插件或第三方工具。只需从文件菜单中选择新选项中的实体从数据库选项。它还会为jpa自动创建persistence.xml。