• About Us
  • Blog
  • Basket
  • Account
  • Sign In
  •  

Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Jun 2017 09:06 PM by  LizH
[Closed] Default Property Values
 4 Replies
Sort:
Topic is locked
Author Messages

TreSensaCoreDev



New Member


Posts:2
New Member


--
03 May 2017 09:36 PM
    When the default property is returned for a 'match.getValues(propertyName)' call, I would like to use null instead.


    The TrieProvider class contains a 'getDefaultPropertyValue(String propertyName)' method, which makes this easy to accomplish. (Simply check the returned value against the default.)


    Can something similar be done with the regular Provider or Match classes?
    0

    Michael



    New Member


    Posts:10
    New Member


    --
    05 May 2017 01:43 PM
    Hi there,

    I shall investigate this for you and give you a response ASAP.

    Thanks,

    Michael
    0

    TreSensaCoreDev



    New Member


    Posts:2
    New Member


    --
    05 May 2017 04:35 PM
    Thanks. I also see the .Net library has a DefaultPropertyValues array of constants, but I couldn't find something similar in the Java library.
    0

    Stephen



    New Member


    Posts:1
    New Member


    --
    25 May 2017 09:49 AM
    Hi,

    So sorry for the delay in getting back to you.
    It is slightly convoluted, but I believe this will do what you want:

    // Get the property object from the dataset
    Property propertyObj = dataset.get(propertyName);
    // Get the component associated with the property
    Values defaultValue = propertyObj.getComponent().
    // Get the default profile for that component
    getDefaultProfile().
    // Get the value for the property from the default profile
    getValues(propertyObj)
    0

    LizH



    New Member


    Posts:4
    New Member


    --
    18 Jun 2017 09:06 PM
    Hi,
    Just checking if the above has answered your question, or do you need further guidance?
    0
    Topic is locked