greetings all. I am now coding in Java due to a new employer and was previously a C#/vb.net coder.
I wanted to know how to accomplish the below in Java (NetBeans). In C# I always separated my web method logic into their own class files for ease of development and future portability.
Your assistance is appreciated.
C# Sample Web Method:
[WebMethod(Description = "sell a house sample.")]
public SellHouse sellHouse(Int32 transactionId, Int32 customerId, string assetId, int assetPrice)
{
return new SellHouse(transactionId, customerId, assetId, assetPrice);
}
C# SellHouse.cs Class File
public class SellHouse
{
#region " Private Members "
private Int32 _transactionID = 0;
private Int32 _customerId = 0;
private string _assetID = String.Empty;
private int _assetPrice = 0;
private int _resultCode = 0;
#endregion
#region " Default "
public SellHouse()
{
}
#endregion
#region " Non-Default "
public SellHouse(Int32 transactionID, Int32 customerId, string assetID, int assetPrice)
{
_transactionID = transactionID;
_customerId = customerId;
_assetID = assetID;
_assetPrice = assetPrice;
purchaseAsset();
}
#endregion
#region " Read/Write Properties "
public int resultCode
{
get
{
return _resultCode;
}
set
{
_resultCode = value;
}
}
#endregion
public void sellHouse()
{
LOGIC
}
}