Changeset 800


Ignore:
Timestamp:
05/13/11 18:57:54 (8 years ago)
Author:
philsmart
Message:
 
Location:
raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/AuthenticationEvent.java

    r788 r800  
    3030    private String principalName; 
    3131 
    32     /** This is fixed to a principal expansion */ 
     32    /** This is fixed to a principal expansion. Not used in 
     33     * Hash or Equality methods */ 
    3334    private PrincipalInformation principalInformation; 
    3435 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/Event.java

    r794 r800  
    2323import org.joda.time.DateTime; 
    2424 
     25import uk.ac.cardiff.model.event.auxiliary.EventMetadata; 
     26 
    2527/** 
    2628 * For any class that extends this class, equality must be computed for the 
    2729 * same fields as the hash. Otherwise a discrepancy will occur when checking 
    2830 * containment through object equality (e.g. set containment), and through hashcodes. 
    29  *  
     31 * 
    3032 * @author philsmart 
    3133 * 
     
    3335public class Event { 
    3436 
    35     /** used if a persistant db primary key is required. Not to  
     37    /** used if a persistant db primary key is required. Not to 
    3638     * be used in the computation of the hash or equals methods */ 
    3739    private Long persistantId; 
     
    3941    /** attributes generic to all entries */ 
    4042    private DateTime eventTime; 
    41      
     43 
    4244    /** Event id, as generated and added by the hashcode of this method. 
    4345     * Not to be used in computation of the hash or equals methods. 
     
    5052    private String resourceId; 
    5153 
    52     /** User defined category for this event for this resourceId, e.g. internal resource or external resource*/ 
     54    /** User defined category for this event for this resourceId, e.g. internal resource or external resource. 
     55     * 1 - Internal 
     56     * 2 - External*/ 
    5357    private int resourceIdCategory; 
     58 
     59    /** Metadata about the service this event was generated from. Not used in 
     60     * Hash or Equality methods. */ 
     61    private EventMetadata eventMetadata; 
    5462 
    5563 
     
    201209        return getClass().getName()+"@[" + this.getEventTime() + "," + this.getServiceHost() + "," + this.getResourceHost() + "]"; 
    202210    } 
     211 
     212    /** 
     213     * @param eventMetadata the eventMetadata to set 
     214     */ 
     215    public void setEventMetadata(EventMetadata eventMetadata) { 
     216        this.eventMetadata = eventMetadata; 
     217    } 
     218 
     219    /** 
     220     * @return the eventMetadata 
     221     */ 
     222    public EventMetadata getEventMetadata() { 
     223        return eventMetadata; 
     224    } 
    203225} 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/EzproxyAuthenticationEvent.java

    r794 r800  
    8686 
    8787        hash = HashCodeUtil.hash(hash,getEventTimeMillis()); 
     88        hash = HashCodeUtil.hash(hash,getEventId()); 
    8889        hash = HashCodeUtil.hash(hash,getAuthenticationType()); 
    8990        hash = HashCodeUtil.hash(hash,getServiceHost()); 
     
    126127        boolean areEqual = 
    127128          EqualsUtil.areEqual(this.getEventTimeMillis(), that.getEventTimeMillis()) && 
     129          EqualsUtil.areEqual(this.getEventId(), that.getEventId()) && 
    128130          EqualsUtil.areEqual(this.getAuthenticationType(), that.getAuthenticationType()) && 
    129131          EqualsUtil.areEqual(this.getServiceHost(), that.getServiceHost()) && 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/ShibbolethIdpAuthenticationEvent.java

    r794 r800  
    127127         } 
    128128 
    129  
    130129        @Override 
    131130        public boolean equals(Object obj){ 
     
    136135            boolean areEqual = 
    137136              EqualsUtil.areEqual(this.getEventTimeMillis(), that.getEventTimeMillis()) && 
     137              EqualsUtil.areEqual(this.getEventId(), that.getEventId()) && 
    138138              EqualsUtil.areEqual(this.getAuthenticationType(), that.getAuthenticationType()) && 
    139139              EqualsUtil.areEqual(this.getServiceHost(), that.getServiceHost()) && 
     
    183183            hash = HashCodeUtil.hash(hash,getEventTimeMillis()); 
    184184            hash = HashCodeUtil.hash(hash,getAuthenticationType()); 
     185            hash = HashCodeUtil.hash(hash,getEventId()); 
    185186            hash = HashCodeUtil.hash(hash,getServiceHost()); 
    186187            hash = HashCodeUtil.hash(hash,getRequestId()); 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/event/event.hbm.xml

    r794 r800  
    3131 
    3232                --><property name="serviceHost" type="string" update="true" 
    33                         insert="true" column="serviceHost" not-null="false" index="requesthost_index" /> 
     33                        insert="true" column="serviceHost" not-null="false" index="requesthost_indx" /> 
    3434                <property name="resourceHost" type="string" update="true" 
    3535                        insert="true" column="resourceHost" not-null="false" /> 
    3636                <property name="serviceId" type="string" update="true" 
    37                         insert="true" column="serviceId" not-null="false" index="serviceid_index" /> 
     37                        insert="true" column="serviceId" not-null="false" index="serviceid_indx" /> 
    3838                <property name="resourceId" type="string" update="true" 
    3939                        insert="true" column="resourceId" not-null="false" /> 
    4040                <property name="eventId" type="integer" update="true" insert="true" 
    41                         column="eventId" not-null="false" /> 
     41                        column="eventId" not-null="true" index="eventid_indx"/> 
    4242                <property name="eventType" type="string" update="true" 
    4343                        insert="true" column="eventType" not-null="false" /> 
     44 
     45                        <property name="resourceIdCategory" type="integer" update="true" 
     46            insert="true" column="resourceIdCategory" not-null="false" /> 
     47 
     48                <component name="eventMetadata"> 
     49            <property name="entityId" type="string" update="true" insert="true" 
     50            column="entityId" index="entityId_index" /> 
     51            <property name="serviceName" type="string" update="true" 
     52            insert="true" column="serviceName" index="serviceName_indx" /> 
     53            <property name="organisationName" type="string" update="true" 
     54            insert="true" column="organisationName" index="organisationName_indx" /> 
     55        </component> 
    4456 
    4557 
     
    5365                        type="string" /> 
    5466                <property name="principalName" column="principalName" type="string" 
    55                         index="principalname_index" /> 
     67                        index="principalname_indx" /> 
    5668 
    5769        <component name="principalInformation"> 
     
    5971            column="school" index="school_index" /> 
    6072            <property name="affiliation" type="string" update="true" 
    61             insert="true" column="affiliation" index="affiliation_index" /> 
     73            insert="true" column="affiliation" index="affiliation_indx" /> 
    6274        </component> 
    6375 
     
    8092                <property name="nameIdentifier" column="nameIdentifier" type="string" /> 
    8193                <property name="responseId" column="responseId" type="string" /> 
    82                 <property name="hashCode" column=" current_hashCode" type="integer" 
    83                         index="hashcode_index" /> 
     94                <property name="hashCode" column="current_hashCode" type="integer" 
     95                        index="hashcode_indx" /> 
    8496        </union-subclass> 
    8597 
     
    90102                <property name="sessionId" column="sessionId" type="string" /> 
    91103                <property name="hashCode" column="current_hashCode" type="integer" 
    92                         index="hashcode_index" /> 
     104                        index="hashcode_indx" /> 
    93105 
    94106        </union-subclass> 
  • raptor-information-model/trunk/src/main/java/uk/ac/cardiff/model/resource/resourcemetadata.hbm.xml

    r759 r800  
    1111 
    1212                <id name="persistantId" column="persistantId" type="long" 
    13                         unsaved-value="null"> 
     13                        unsaved-value="0"> 
    1414                        <generator class="native"> 
    1515                                <param name="sequence">hib_resource_metadata_seq</param> 
Note: See TracChangeset for help on using the changeset viewer.