Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 6156 Details for
Bug 43313
Strange javac behaviour when using javac from 1.3.1_09
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
The file generated with the standard javac
f1.java (text/plain), 17.79 KB, created by
Antoan Nikolaev
on 2003-09-18 14:45:39 EDT
(
hide
)
Description:
The file generated with the standard javac
Filename:
MIME Type:
Creator:
Antoan Nikolaev
Created:
2003-09-18 14:45:39 EDT
Size:
17.79 KB
patch
obsolete
> > >package com.westernasset.atp.model; > >import com.westernasset.atp.client.utils.CommonUtils; >import com.westernasset.atp.common.model.UserInfoTO; >import com.westernasset.atp.common.util.math.AtpMath; >import com.westernasset.common.log.IWAMLogger; >import com.westernasset.common.log.WAMLogger; >import java.io.Serializable; >import java.util.*; > >// Referenced classes of package com.westernasset.atp.model: >// SecurityInfoTO, AllocationBaseTO, PortfolioTO, StrategyTO, >// BrokerTO, TransactionTypeTO > >public abstract class DealBaseTO > implements Serializable >{ > > public DealBaseTO() > { > status = STATUS_NEW; > allocations = new HashMap(); > } > > public String getAssetId() > { > if(security == null) > return null; > else > return security.getAssetId(); > } > > public String getCusip() > { > if(security == null) > return null; > else > return security.getCusip(); > } > > public String getIsin() > { > if(security == null) > return null; > else > return security.getIsin(); > } > > public Date getMaturity() > { > return maturityDate; > } > > public Integer getProductId() > { > if(security == null) > return null; > else > return security.getProductId(); > } > > public Integer getSecurityId() > { > if(security == null) > return null; > else > return security.getSecurityId(); > } > > public SecurityInfoTO getSecurity() > { > return security; > } > > public void setAssetId(String assetId) > { > if(security == null) > security = new SecurityInfoTO(); > security.setAssetId(assetId); > } > > public void setCusip(String cusip) > { > if(security == null) > security = new SecurityInfoTO(); > security.setCusip(cusip); > } > > public void setIsin(String isin) > { > if(security == null) > security = new SecurityInfoTO(); > security.setIsin(isin); > } > > public void setMaturity(Date maturity) > { > maturityDate = maturity; > } > > public void setProductId(Integer productId) > { > if(security == null) > security = new SecurityInfoTO(); > security.setProductId(productId); > } > > public void setSecurityId(Integer secid) > { > if(security == null) > security = new SecurityInfoTO(); > security.setSecurityId(secid); > } > > public void setSecurity(SecurityInfoTO security) > { > this.security = security; > if(security != null && factor == null) > factor = security.getFactor(); > if(factor == null) > factor = new Double(1.0D); > } > > public Collection getAllocations() > { > return allocations.values(); > } > > public int[] getPortfolioIdsFromAllocs() > { > int pfIds[] = new int[allocations.size()]; > int i = 0; > for(Iterator it = getAllocations().iterator(); it.hasNext();) > { > AllocationBaseTO allocationBaseTO = (AllocationBaseTO)it.next(); > PortfolioTO portTO = allocationBaseTO.getPortfolio(); > pfIds[i] = portTO.getId().intValue(); > i++; > } > > return pfIds; > } > > public void setAllocations(Collection allocs) > { > allocations.clear(); > addAllocations(allocs); > } > > public double getAllocTotal() > { > double total = 0.0D; > Collection allocs = getAllocations(); > for(Iterator iter = allocs.iterator(); iter.hasNext();) > { > AllocationBaseTO alloc = (AllocationBaseTO)iter.next(); > total = AtpMath.add(total, alloc.getAmount()); > } > > return total; > } > > public void addAllocation(AllocationBaseTO alloc) > { > if(alloc.getPortfolio() == null) > { > CAT.error("The Portfolio in the Alloc object is null, alloc=" + alloc); > return; > } else > { > updateAllocFromDeal(alloc); > allocations.put(alloc.getPortfolio().getId(), alloc); > return; > } > } > > public void mergeAllocation(AllocationBaseTO alloc) > { > if(alloc.getPortfolio() == null) > { > CAT.error("The Portfolio in the Alloc object is null, alloc=" + alloc); > return; > } > AllocationBaseTO tempAlloc = (AllocationBaseTO)allocations.get(alloc.getPortfolio().getId()); > if(tempAlloc != null) > tempAlloc.setAmount(tempAlloc.getAmount() + alloc.getAmount()); > else > allocations.put(alloc.getPortfolio().getId(), alloc); > } > > public void mergeAllocations(Collection newAllocs) > { > AllocationBaseTO alloc; > for(Iterator iterator = newAllocs.iterator(); iterator.hasNext(); mergeAllocation(alloc)) > alloc = (AllocationBaseTO)iterator.next(); > > } > > public void updateAllocFromDeal(AllocationBaseTO alloc) > { > checkAndSetOverrideIfNecessary(alloc); > } > > private void checkAndSetOverrideIfNecessary(AllocationBaseTO alloc) > { > alloc.setFactor(getFactor()); > alloc.setSecurity(getSecurity()); > if(STATUS_POST.equals(getStatus()) && !CommonUtils.isEmptyStr(alloc.getRestriction())) > alloc.setOverrideRestriction(true); > } > > public void addAllocations(Collection newAllocs) > { > AllocationBaseTO alloc; > for(Iterator iterator = newAllocs.iterator(); iterator.hasNext(); addAllocation(alloc)) > alloc = (AllocationBaseTO)iterator.next(); > > } > > public AllocationBaseTO getAllocation(PortfolioTO portfolio) > { > return getAllocationByPortfolioId(portfolio.getId()); > } > > public AllocationBaseTO getAllocationByPortfolioId(Integer pfId) > { > if(allocations == null) > return null; > else > return (AllocationBaseTO)allocations.get(pfId); > } > > public boolean removeAllocationByPortfolio(PortfolioTO portfolio) > { > Object ret = allocations.remove(portfolio.getId()); > return ret != null; > } > > public BrokerTO getBroker() > { > return broker; > } > > public TransactionTypeTO getTransactionType() > { > return transactionType; > } > > public void setBroker(BrokerTO broker) > { > this.broker = broker; > } > > public void setTransactionType(TransactionTypeTO transactionType) > { > this.transactionType = transactionType; > } > > public int getDealAction() > { > return dealAction; > } > > public void setDealAction(int dealAction) > { > if(dealAction != 1 && dealAction != 2 && dealAction != 3 && dealAction != -1 && dealAction != 0) > { > throw new RuntimeException("Invalid Deal Action"); > } else > { > this.dealAction = dealAction; > return; > } > } > > public Integer getId() > { > return id; > } > > public void setId(Integer dealId) > { > id = dealId; > } > > public Date getExpirationDate() > { > return expirationDate; > } > > public void setExpirationDate(Date expirationDate) > { > this.expirationDate = expirationDate; > } > > public Date getLastUpdate() > { > return lastUpdate; > } > > public void setLastUpdate(Date lastUpdate) > { > this.lastUpdate = lastUpdate; > } > > public String getComment() > { > return comment; > } > > public void setComment(String comment) > { > this.comment = comment; > } > > public UserInfoTO getUser() > { > return user; > } > > public void setUser(UserInfoTO user) > { > this.user = user; > } > > public Double getOriginalFace() > { > return originalFace; > } > > public Double getParAmount() > { > return parAmount; > } > > public Double getPrice() > { > return price; > } > > public void setOriginalFace(Double originalFace) > { > this.originalFace = originalFace; > } > > public void setParAmount(Double parAmount) > { > this.parAmount = parAmount; > } > > public void setPrice(Double price) > { > this.price = price; > if(price != null) > setPriceText(price.toString()); > } > > public Integer getLocationId() > { > return locationId; > } > > public void setLocationId(Integer locationId) > { > this.locationId = locationId; > } > > public Integer getStatus() > { > return status; > } > > public void setStatus(Integer status) > { > this.status = status; > AllocationBaseTO alloc; > for(Iterator iterator = getAllocations().iterator(); iterator.hasNext(); checkAndSetOverrideIfNecessary(alloc)) > alloc = (AllocationBaseTO)iterator.next(); > > } > > public Double getFactor() > { > return factor; > } > > public void setFactor(Double factor) > { > this.factor = factor; > } > > public abstract String getDealType(); > > public abstract AllocationBaseTO createAllocation(); > > public String getDealActionStr() > { > switch(getDealAction()) > { > case 1: // '\001' > return "POST"; > > case 2: // '\002' > return "DRAFT"; > > case 3: // '\003' > return "REVERSE"; > > case -1: > return "VOID"; > > case 0: // '\0' > default: > return "NONE"; > } > } > > public String getStatusStr() > { > if(status == null || status.equals(STATUS_NEW)) > return "New"; > if(status.equals(STATUS_POST)) > return "Posted"; > if(status.equals(STATUS_DRAFT)) > return "Drafted"; > if(status.equals(STATUS_REVERSE)) > return "Reversed"; > if(status.equals(STATUS_VOID)) > return "Voided"; > else > return "Unknown"; > } > > public String getSettleStatus() > { > return settleStatus; > } > > public void setSettleStatus(String settleStatus) > { > this.settleStatus = settleStatus; > } > > public void initUsing(DealBaseTO dealBase) > { > id = null; > status = STATUS_NEW; > comment = dealBase.getComment(); > settleStatus = dealBase.getSettleStatus(); > locationId = dealBase.getLocationId(); > broker = dealBase.getBroker(); > transactionType = dealBase.getTransactionType(); > security = dealBase.getSecurity(); > user = dealBase.getUser(); > setAllocations(createCompatibleAllocations(dealBase.getAllocations())); > expirationDate = dealBase.getExpirationDate(); > lastUpdate = dealBase.getLastUpdate(); > originalFace = dealBase.getOriginalFace(); > parAmount = dealBase.getParAmount(); > price = dealBase.getPrice(); > priceText = dealBase.getPriceText(); > factor = dealBase.getFactor(); > strategy = dealBase.getStrategy(); > } > > public Collection createCompatibleAllocations(Collection allocations) > { > ArrayList newAllocs = new ArrayList(); > AllocationBaseTO newAlloc; > for(Iterator iterator = allocations.iterator(); iterator.hasNext(); newAllocs.add(newAlloc)) > { > AllocationBaseTO alloc = (AllocationBaseTO)iterator.next(); > newAlloc = createAllocation(); > newAlloc.initUsing(alloc); > } > > return newAllocs; > } > > public Integer getDataSourceId() > { > return dataSourceId; > } > > public void setDataSourceId(Integer integer) > { > dataSourceId = integer; > } > > public Integer getSecondaryId() > { > return secondaryId; > } > > public void setSecondaryId(Integer integer) > { > secondaryId = integer; > } > > public StrategyTO getStrategy() > { > return strategy; > } > > public void setStrategy(StrategyTO strategyTO) > { > strategy = strategyTO; > } > > public int getTicketTypeId() > { > return ticketTypeId; > } > > public void setTicketTypeId(int i) > { > ticketTypeId = i; > } > > public boolean equals(Object obj) > { > if(obj instanceof DealBaseTO) > { > DealBaseTO deal = (DealBaseTO)obj; > if(!CommonUtils.equals(id, deal.id)) > return false; > if(!CommonUtils.equals(status, deal.status)) > return false; > if(!CommonUtils.equals(comment, deal.comment)) > return false; > if(!CommonUtils.equals(settleStatus, deal.settleStatus)) > return false; > if(!CommonUtils.equals(locationId, deal.locationId)) > return false; > if(!CommonUtils.equals(broker, deal.broker)) > return false; > if(!CommonUtils.equals(transactionType, deal.transactionType)) > return false; > if(!CommonUtils.equals(security, deal.security)) > return false; > if(!CommonUtils.equals(strategy, deal.strategy)) > return false; > if(!CommonUtils.equals(maturityDate, deal.maturityDate)) > return false; > if(!CommonUtils.equals(expirationDate, deal.expirationDate)) > return false; > if(!CommonUtils.equals(originalFace, deal.originalFace)) > return false; > if(!CommonUtils.equals(getParAmount(), deal.getParAmount())) > return false; > if(!CommonUtils.equals(price, deal.price)) > return false; > if(allocations.size() != deal.allocations.size()) > return false; > for(Iterator iterator1 = allocations.keySet().iterator(); iterator1.hasNext();) > { > Object key = iterator1.next(); > if(!CommonUtils.equals(allocations.get(key), deal.allocations.get(key))) > return false; > } > > return true; > } else > { > return false; > } > } > > public void populateMinimalFromDeal(DealBaseTO deal) > { > setId(deal.getId()); > if(getFactor() == null) > setFactor(deal.getFactor()); > if(getMaturity() == null) > setMaturity(deal.getMaturity()); > if(getStrategy() != null) > getStrategy().setTradeId(deal.getId()); > if(getLastUpdate() == null) > setLastUpdate(deal.getLastUpdate()); > } > > public String toString() > { > if(id != null) > return "Deal " + getStatusStr() + " Trade Id " + id; > else > return "Deal " + getStatusStr(); > } > > public String getPriceText() > { > return priceText; > } > > public void setPriceText(String string) > { > priceText = string; > } > > static Class _mthclass$(String x0) > { > try > { > return Class.forName(x0); > } > catch(ClassNotFoundException x1) > { > throw new NoClassDefFoundError(x1.getMessage()); > } > } > > private static final transient IWAMLogger CAT; > public static final int ACTION_NONE = 0; > public static final int ACTION_POST = 1; > public static final int ACTION_DRAFT = 2; > public static final int ACTION_REVERSE = 3; > public static final int ACTION_VOID = -1; > public static final String ACTION_STR_NONE = "NONE"; > public static final String ACTION_STR_POST = "POST"; > public static final String ACTION_STR_DRAFT = "DRAFT"; > public static final String ACTION_STR_REVERSE = "REVERSE"; > public static final String ACTION_STR_VOID = "VOID"; > public static final String STATUS_STR_UNKNOWN = "Unknown"; > public static final String STATUS_STR_NEW = "New"; > public static final String STATUS_STR_POST = "Posted"; > public static final String STATUS_STR_DRAFT = "Drafted"; > public static final String STATUS_STR_REVERSE = "Reversed"; > public static final String STATUS_STR_VOID = "Voided"; > public static final int ST_POSTED = 1; > public static final int ST_DRAFT = 0; > public static final int ST_REVERSE = -1; > public static final int ST_VOID = -2; > public static final Integer STATUS_NEW = new Integer(-1000); > public static final Integer STATUS_POST = new Integer(1); > public static final Integer STATUS_DRAFT = new Integer(0); > public static final Integer STATUS_REVERSE = new Integer(-1); > public static final Integer STATUS_VOID = new Integer(-2); > public static final int DATA_SOURCE_ATP = 111; > public static final String DATA_SOURCE_STR_ATP = "ATP"; > public static final int DATA_SOURCE_TRADE_WEB = 112; > public static final String DATA_SOURCE_STR_TRADE_WEB = "TradeWeb"; > private int dealAction; > private Integer dataSourceId; > private Integer id; > private Integer status; > private String comment; > private String settleStatus; > private Integer locationId; > private BrokerTO broker; > private TransactionTypeTO transactionType; > private SecurityInfoTO security; > private UserInfoTO user; > private HashMap allocations; > private StrategyTO strategy; > private Date maturityDate; > private Date expirationDate; > private Date lastUpdate; > private Double originalFace; > private Double parAmount; > private Double price; > private String priceText; > private Double factor; > private int ticketTypeId; > protected Integer secondaryId; > > static > { > CAT = WAMLogger.getInstance(com.westernasset.atp.model.DealBaseTO.class); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 43313
: 6156 |
6157