com.moneydance.apps.md.model
Enum InvestTxnType

java.lang.Object
  extended by java.lang.Enum<InvestTxnType>
      extended by com.moneydance.apps.md.model.InvestTxnType
All Implemented Interfaces:
DisplayableObject, java.io.Serializable, java.lang.Comparable<InvestTxnType>

public enum InvestTxnType
extends java.lang.Enum<InvestTxnType>
implements DisplayableObject

Defines the various types of investment transactions. The ordinal values are fixed to the original integers mapped to investment transaction types, as previously defined in TxnUtil:

       TXN_TYPE_BUY = 0;
       TXN_TYPE_SELL = 1;
       TXN_TYPE_BUY_XFER = 2;
       TXN_TYPE_SELL_XFER = 3;
       TXN_TYPE_BANK = 4;
       TXN_TYPE_DIVIDEND = 5;
       TXN_TYPE_SHORT = 6;
       TXN_TYPE_COVER = 7;
       TXN_TYPE_DIVIDENDXFR = 8;
       TXN_TYPE_MISCINC = 9;
       TXN_TYPE_MISCEXP = 10;
       TXN_TYPE_DIVIDEND_REINVEST = 11;
 

Author:
Kevin Menningen - Mennē Software Solutions, LLC

Enum Constant Summary
BANK
          Moves cash from some other account to the cash of the investment account.
BUY
          Removes cash from investment account and converts to shares of a security.
BUY_XFER
          Removes cash from some other account and converts to shares of a security.
COVER
          Removes cash from investment account and converts to shares of a security.
DIVIDEND
          Adds cash to the investment account.
DIVIDEND_REINVEST
          Adds shares to the security worth a certain amount of cash, no change in cash amounts.
DIVIDENDXFR
          Adds cash to some other account.
MISCEXP
          Removes cash to the investment account.
MISCINC
          Adds cash to the investment account.
SELL
          Removes shares of a security and adds cash to the investment account.
SELL_XFER
          Removes shares of a security and adds cash to some other account.
SHORT
          Removes shares of a security and adds cash to the investment account.
 
Field Summary
static InvestTxnType[] ALL_TXN_TYPES
          the complete list of all investment transaction types.
static InvestTxnType DEFAULT
          The default security type to use if none is specified.
 
Method Summary
 java.lang.String getLongResourceKey()
           
 java.lang.String getResourceKey()
          Return a resource key for a localized string describing this object.
static InvestTxnType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static InvestTxnType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BUY

public static final InvestTxnType BUY
Removes cash from investment account and converts to shares of a security.


SELL

public static final InvestTxnType SELL
Removes shares of a security and adds cash to the investment account.


BUY_XFER

public static final InvestTxnType BUY_XFER
Removes cash from some other account and converts to shares of a security.


SELL_XFER

public static final InvestTxnType SELL_XFER
Removes shares of a security and adds cash to some other account.


BANK

public static final InvestTxnType BANK
Moves cash from some other account to the cash of the investment account.


DIVIDEND

public static final InvestTxnType DIVIDEND
Adds cash to the investment account.


SHORT

public static final InvestTxnType SHORT
Removes shares of a security and adds cash to the investment account.


COVER

public static final InvestTxnType COVER
Removes cash from investment account and converts to shares of a security.


DIVIDENDXFR

public static final InvestTxnType DIVIDENDXFR
Adds cash to some other account.


MISCINC

public static final InvestTxnType MISCINC
Adds cash to the investment account.


MISCEXP

public static final InvestTxnType MISCEXP
Removes cash to the investment account.


DIVIDEND_REINVEST

public static final InvestTxnType DIVIDEND_REINVEST
Adds shares to the security worth a certain amount of cash, no change in cash amounts.

Field Detail

DEFAULT

public static final InvestTxnType DEFAULT
The default security type to use if none is specified.


ALL_TXN_TYPES

public static final InvestTxnType[] ALL_TXN_TYPES
the complete list of all investment transaction types.

Method Detail

values

public static InvestTxnType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (InvestTxnType c : InvestTxnType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static InvestTxnType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getLongResourceKey

public java.lang.String getLongResourceKey()
Returns:
The resource key for obtaining a long form localized descriptive string / tooltip.

getResourceKey

public java.lang.String getResourceKey()
Description copied from interface: DisplayableObject
Return a resource key for a localized string describing this object.

Specified by:
getResourceKey in interface DisplayableObject
Returns:
The resource key for obtaining a localized descriptive string / tooltip.