Tags » NetBeans

Tips: NetBeans on Ubuntu

Ubuntu Linux is a very nice software development platform and NetBeans fit very well in it.

Nevertheless few tips can make our developer life easier. These tips can be applied to other Linux distributions. 450 more words

Java

Using Hibernate with Netbeans 7.2

Note: Hibernate libraries should be added for both projects.

Person POJO class generated from the database.

@Entity
@Table(name = "PERSON")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Person.findAll", query = "SELECT p FROM Person p"),
    @NamedQuery(name = "Person.findByPersonid", query = "SELECT p FROM Person p WHERE p.personid = :personid"),
    @NamedQuery(name = "Person.findByName", query = "SELECT p FROM Person p WHERE p.name = :name"),
    @NamedQuery(name = "Person.findByAge", query = "SELECT p FROM Person p WHERE p.age = :age")})
public class Person implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "PERSONID")
    private Integer personid;
    @Size(max = 50)
    @Column(name = "NAME")
    private String name;
    @Column(name = "AGE")
    private Integer age;

    public Person() {
    }

    public Person(Integer personid) {
        this.personid = personid;
    }

    public Integer getPersonid() {
        return personid;
    }

    public void setPersonid(Integer personid) {
        this.personid = personid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (personid != null ? 307 more words
Code

00 The Quick Start Guide to Coding in Java

The Quick Start Guide to Coding in Java

The two necessities you need for a quick Java coding environment:

  1. The Java SDK (Software Development Kit)
  2. 240 more words
Eclipse

New version of "Eclipse Code Formatter for Java" plugin – 1.8.0.4

Breakpoints will now be preserved – that is the major change. Unfortunately linebreakpoints are not supported, but better than nothing and better than the previous state. 116 more words

One-to-many mapping using Hibernate

HibernateUtil class


public class HibernateUtil {

private static final SessionFactory sessionFactory;

static {
try {
// Create the SessionFactory from standard (hibernate.cfg.xml)
// config file. 234 more words

Sliit

Introductory Computer Programming in Java - video playlist on YouTube

I’m teaching ICS3C/3U online right now, and I’ve been making videos for my students to learn from. I realize there are good resources online for this stuff already, but there are three reasons I’m making my own instead of curating other sources: 156 more words

Education