Show
Ignore:
Timestamp:
07/03/09 18:45:39 (14 months ago)
Author:
rcmatthews
Message:
 
Files:
1 copied

Legend:

Unmodified
Added
Removed
  • incubator/examples/accounts/dom/src/main/java/org/nakedobjects/application/accounts/dom/Transaction.java

    r14137 r14143  
    1 package org.nakedobjects.application.accounts.dom.claim; 
     1package org.nakedobjects.application.accounts.dom; 
    22 
    33import org.nakedobjects.applib.AbstractDomainObject; 
     4import org.nakedobjects.applib.annotation.Disabled; 
     5import org.nakedobjects.applib.annotation.Optional; 
     6import org.nakedobjects.applib.value.Date; 
     7import org.nakedobjects.applib.value.Money; 
     8 
    49 
    510public class Transaction extends AbstractDomainObject { 
     11    private Date date; 
     12    private Money amount; 
     13    private String description; 
     14    private TransactionCreator createdBy; 
     15    private Account accountFrom; 
     16    private Account accountTo; 
     17    private Category category; 
     18    private boolean reconciled; 
    619 
     20    public String title() { 
     21        return description; 
     22    } 
     23 
     24    public Date getDate() { 
     25        return date; 
     26    } 
     27 
     28    public void setDate(Date date) { 
     29        this.date = date; 
     30    } 
     31 
     32    public Money getAmount() { 
     33        return amount; 
     34    } 
     35 
     36    public void setAmount(Money amount) { 
     37        this.amount = amount; 
     38    } 
     39 
     40    @Optional 
     41    public String getDescription() { 
     42        return description; 
     43    } 
     44 
     45    public void setDescription(String description) { 
     46        this.description = description; 
     47    } 
     48 
     49    @Optional 
     50    public TransactionCreator getCreatedBy() { 
     51        return createdBy; 
     52    } 
     53 
     54    public void setCreatedBy(TransactionCreator createdBy) { 
     55        this.createdBy = createdBy; 
     56    } 
     57 
     58    @Disabled 
     59    @Optional 
     60    public Account getAccountFrom() { 
     61        return accountFrom; 
     62    } 
     63 
     64    public void setAccountFrom(Account accountFrom) { 
     65        this.accountFrom = accountFrom; 
     66    } 
     67 
     68    @Disabled 
     69    @Optional 
     70    public Account getAccountTo() { 
     71        return accountTo; 
     72    } 
     73 
     74    public void setAccountTo(Account accountTo) { 
     75        this.accountTo = accountTo; 
     76    } 
     77 
     78    public Category getCategory() { 
     79        return category; 
     80    } 
     81 
     82    public void setCategory(Category category) { 
     83        this.category = category; 
     84    } 
     85 
     86    @Disabled 
     87    public boolean isReconciled() { 
     88        return reconciled; 
     89    } 
     90 
     91    public void setReconciled(boolean reconciled) { 
     92        this.reconciled = reconciled; 
     93    } 
    794} 
    895 
    9  
    1096// Copyright (c) Naked Objects Group Ltd.