package com.demo.

Product Review
Java and Caché—a wave worth catching
InterSystems Corp.'s Caché 4.0
Reviewed by Jon Elsom
Listing 1. package com.demo.


/**
 * Cache' Java Class Generated 09:03PM  22 Jun 2001 for class com.demo.Staffer
 *
**/

package com.demo;

/**
 * Imports
 *
**/
import java.util.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Hashtable;
import java.math.BigInteger;
import java.math.BigDecimal;
import COM.intersys.objects.*;
import COM.intersys.objects.attribute.*;
import COM.intersys.util.SysList;
import COM.intersys.util.CacheException;

import Person;

public class Staffer extends Person {
    /**
     * Constructor creates a new instance
    **/
    public Staffer( ObjectServer os ) throws CacheException {
        super( os, new SysList() );
    }

    /**
     * Constructor creates a new instance (with arguments)
    **/
    public Staffer( ObjectServer os, SysList args ) throws CacheException {
        super( os, args );
    }

    /**
     * Constructor creates attaches to an existing oref
    **/
    public Staffer( ObjectServer os, Oref oref ) throws CacheException {
        super( os, oref );
    }

    /**
     * Constructor opens the specified instance
    **/
    public Staffer( ObjectServer os, Oid oid ) throws CacheException {
        super( os, oid );
    }

    /**
     * Constructor opens the specified instance
    **/
    public Staffer( ObjectServer os, String id ) throws CacheException {
        super( os, new Oid( id ) );
    }

    /**
     * Constructor opens the specified instance
    **/
    public Staffer( ObjectServer os, int id ) throws CacheException {
        super( os, new Oid( id ) );
    }

    /**
     * _close closes an Oref
    **/
    public void _close() throws CacheException {
        synchronized (m_objectServer)  {
            super._close();
        }
    }

    /**
     * Parameters
    **/

    /**
     * Property Storage
    **/
    private StringAttr m_email;
    private StringAttr m_jobDesc;
    private TransientAttr m_supervisor;
    private StringAttr m_title;
    private IntAttr m_yearsOfService;

    /**
     * Initialize the class
    **/
    protected String _initClass( Hashtable h ) {
        h.put( "email", (m_email = new StringAttr( this, "email" )) );
        h.put( "jobDesc", (m_jobDesc = new StringAttr( this, "jobDesc" )) );
        h.put( "supervisor", (m_supervisor = new TransientAttr( this, "supervisor" )) );
        h.put( "title", (m_title = new StringAttr( this, "title" )) );
        h.put( "yearsOfService", (m_yearsOfService = new IntAttr( this, "yearsOfService" )) );
        super._initClass( h );
        return "com.demo.Staffer";
    }

    /**
     * Get Accessor method for email
    **/
    public String getemail() throws CacheException {
        return m_email.get();
    }

    /**
     * Set Accessor method for email
    **/
    public void setemail(String value) throws CacheException {
        m_email.set( value );
    }

    /**
     * Get Accessor method for jobDesc
    **/
    public String getjobDesc() throws CacheException {
        return m_jobDesc.get();
    }

    /**
     * Set Accessor method for jobDesc
    **/
    public void setjobDesc(String value) throws CacheException {
        m_jobDesc.set( value );
    }

    /**
     * Get Accessor method for supervisor
    **/
    public Person getsupervisor() throws CacheException {
        return (Person) m_supervisor.get();
    }

    /**
     * Set Accessor method for supervisor
    **/
    public void setsupervisor(Person value) throws CacheException {
        m_supervisor.set( (Transient) value );
    }

    /**
     * Get Accessor method for title
    **/
    public String gettitle() throws CacheException {
        return m_title.get();
    }

    /**
     * Set Accessor method for title
    **/
    public void settitle(String value) throws CacheException {
        m_title.set( value );
    }

    /**
     * Get Accessor method for yearsOfService
    **/
    public int getyearsOfService() throws CacheException {
        return m_yearsOfService.get();
    }

    /**
     * Set Accessor method for yearsOfService
    **/
    public void setyearsOfService(int value) throws CacheException {
        m_yearsOfService.set( value );
    }

    /**
     * Query initiator for query findSilverWatch
    **/
    public ResultSet Query_findSilverWatch() throws CacheException {
        ResultSet _rs;
        _rs = new ResultSet( m_objectServer, "com.demo.Staffer", "findSilverWatch" );
        return _rs;
    }
}

About the Author

Jon Elsom is a freelance consultant working with Hang 10 Systems, an OO consultancy based in Brighton, UK. He can be contacted at Jon.Elsom@Hang10Systems.co.uk.

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.